Phoenix at Scale

Phoenix at Scale

Phoenix framework (Elixir) with Redis, at Scale. tokyo.ex#9 #tokyoex

4b071f90c5d9c0a58e2d9076460b7be4?s=128

さっちゃん

October 20, 2018
Tweet

Transcript

  1. 1IPFOJYBU4DBMF

  2. ŇP0 ͬͪ͞ΌΜͰ͢Αʌ ʏM@M ůƄˑ

  3. ŇP0 さっちゃん ですよʌ ʏM@M ůƄˑ ℷ၊໊

  4. 1IPFOJYͰSFBMUJNF1W1(BNF Λ࡞Δؒʹى͖ͨۤႾ࿩ IUUQTTQFBLFSEFDLDPN OF@TBDIJSPVTVUFUPIVSVEFEB HVJNPBLVTFTVGBMTFBSVTPGU SFBMUJNFOBHFNVTBCBXPFBTZOJU VLVSV ʮ&MJYJS΍ͬͯΈͨʯˠʮ&MJYJSʹ ೖ໳ͨ͠ʯͷܨ͗ʹͳΔ஌ࣝ IUUQTTQFBLFSEFDLDPN

    OF@TBDIJSPVFMJYJSXBORVBO OJMJKJFTJUB
  5. -FU`TTUBSUGSPNTNBMMVTFST

  6. 1IPFOJY$IBOOFM 8FC4PDLFU ,74  1VC4VC

  7. 8IZ3FEJT  8FBMSFBEZLOPXBCPVU3FEJT 3FEJTIBTNBOVVTBCMFGFBUVSFT BMMJOPOFTFSWFS ,74 -JTU 4FU )BTI 4PSUFE4FU

    )ZQFS-PH-PH  (FPSBEJVT 1VC4VC 4USFBN -VB  4QFFEZ QIPFOJY@QVCTVC@SFEJTJTEFGBVMU
  8. 6TF3FEJTGSPN&MJYJS &YSFEJT QPPMCPZ QPPMCPZ &54 FSFEJT@DMJFOU HFO@UDQ FSFEJT@DMJFOU HFO@UDQ FSFEJT@DMJFOU

    HFO@UDQ 6TFS NPOJUPS USBOTBDUJPO RVFSZ RVFSZ
  9. 6TF3FEJTGSPN&MJYJS 3FEJY 3FEJY$POOFDUJPO HFO@UDQ 6TFS QJQFMJOF 3FEJY$POOFDUJPO3FDFJWFS QJQFMJOF ݁Ռ ݁Ռ

    3FEJY$POOFDUJPO4IBSFE4UBUF FORVFVF EFRVFVF
  10. 1VC4VCUISPVHI3FEJT 1IPFOJY1VC4VC3FEJT 3FEJY QPPMCPZ 3FEJY 16#-*4)QIY.Z1VC4VC 3FEJY 3FEJY 46#4$3*#&QIY.Z1VC4VC 1VC4VCBMMUPQJDTCZ3FEJTLFZ

    QPPMCPZ
  11. 1IPFOJY$IBOOFM 8FC4PDLFU ,74  1VC4VC

  12. .BOZVTFSTDPNF

  13. None
  14. 1IPFOJYTFSWFSCVSOT -FU`T4DBMFPVU

  15. None
  16. 4DBMFPVU1IPFOJYTFSWFST 4DBMFPVUTFSWFSTJTFBTZ 8FVTF"-# ,T 1IPFOJY1VC4VC 8BJUUPTUBSU 3FBEZOFTTQSPCFIUUQTIFYQN QBDLBHFTLPNBDIJ@IFBSUCFBU  8BJUUPUFSNJOBUF

    1SF4UPQIPPL 
  17. None
  18. /FUXPSLCFUXFFO1IPFOJY3FEJTCVSOT 4QMJU,741VC4VC

  19. ,74 1VC4VC

  20. 4QMJU,741VC4VC *U`T

  21. ,74 1VC4VC

  22. ,74 1VC4VC ,74CVSOT $POOFDUJPOQPPMJOH 4DBMFPVU3FEJT

  23. ,74 1VC4VC

  24. $POOFDUJPOQPPMJOH IUUQTIFYEPDTQNSFEJYSFBMXPSMEVTBHFIUNM

  25. $POOFDUJPOQPPMJOH 4FMFDU 4USJOHUP@FYJTUJOH@BUPN l.Z3FEJY\SBOEVOJGPSN O ^z  1JQFMJOF 3FEJYDPNNBOE .Z3FEJY

    <l(&5z LFZ>  8FNBEF3FEJT;IUUQTIFYQNQBDLBHFTSFEJT@[ .Z3FEJY .Z3FEJY 6TFS TFMFDUQJQFMJOF
  26. 4DBMFPVU3FEJT 8IZOPU3FEJT$MVTUFS *U`TIBSEUPPQT

  27. 4DBMFPVU3FEJT 4FMFDU 4USJOHUP@FYJTUJOH@BUPN l.Z3FEJY\FSMBOHQIBTI LFZ O ^z  1JQFMJOF 3FEJYDPNNBOE

    .Z3FEJY <l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