Upgrade to Pro — share decks privately, control downloads, hide ads and more …

카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우

kakao
November 01, 2024

카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우

#분산락 #AOP #함수형 프로그래밍

동시에 몰려오는 카카오페이의 수많은 거래를 빠르고 안전하게 처리하기 위한 우아한 분산락 노하우를 공유합니다. 피할 수 없는 동시성 이슈를 함수형 프로그래밍을 적용한 우아한 분산락으로 해결하는 방법이 궁금하다면, 지금 바로 영상을 재생해 주세요.

발표자 : snow.y
카카오페이 해외결제서비스를 개발하는 스노우입니다.
함수형 프로그래밍을 좋아하며, 개발 외에도 탁구와 수영 등 다양한 분야에 열정 쏟기를 좋아합니다.

kakao

November 01, 2024
Tweet

More Decks by kakao

Other Decks in Programming

Transcript

  1.      ਗੑӘ ୭ઙਖ਼ঘ ਗ ੿࢚੸ੋ҅ઝѢېா੉झ ࢎਊ੗

    ҅ઝ  ਗ୹Ә    ਷೯ ୭ઙਖ਼ঘ ਗ ਖ਼ঘ ਗ
  2.  ਗੑӘ ҅ઝ ਷೯ ਖ਼ঘ ਗ ࠺੿࢚੸ੋ҅ઝѢېா੉झ   

     ਗ୹Ә ୭ઙਖ਼ঘ ਗ ࢎਊ੗     ୭ઙਖ਼ঘ ਗ
  3.       ੿࢚ਖ਼ঘ -PTUVQEBUF੉गߊࢤ  

        ࠺੿࢚੸ੋ҅ઝѢېா੉झ
  4.       ੿࢚ਖ਼ঘ -PTUVQEBUF੉गߊࢤ  

        ࠺੿࢚੸ੋ҅ઝѢېா੉झ
  5. ۅࠁਬ ୹Ә୊ܻ  ਗ୹Ә ۅ؀ӝ ੑӘ؀ӝ ਖ਼ঘ ਗ  ਗੑӘ

    ؀ӝ ࢎਊ੗ ࠙࢑ۅ੸ਊ҅ઝ ਖ਼ঘ ਗ    ਷೯ ۅ೧ઁ
  6. ਖ਼ঘ ਗഛੋ  ਗ୹Ә ۅࠁਬ ୹Ә୊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WBMSFEJTTPO$MJFOU3FEJTTPO$MJFOU \ GVO3VTFS-PDL VTFS*E6TFS*E CMPDL  -> 3

     3\ WBMMPDL3-PDLSFEJTTPO$MJFOUHFU-PDL VTFS*EUP-PDL,FZ SFUVSOUSZ\ MPDLMPDL CMPDL ^ fi OBMMZ\ MPDLVOMPDL ^ ^ ^ ۅദٙ ۅ೧ઁ
  18. !4FSWJDF DMBTT.Z4FSWJDF QSJWBUFWBMMPDL.BOBHFS-PDL.BOBHFS \ GVODSJUJDBM4FDUJPO VTFS*E6TFS*E  \ MPDL.BOBHFSVTFS-PDL VTFS*E

    \ ઺ਃ۽૒प೯ ҕਬؘ੉ఠࢎਊೞৈ੘সࣻ೯ ^ ^ ^ ࠙࢑ۅ੸ਊ৔৉  ੸ਊݫࢲ٘
  19. !4FSWJDF DMBTT.Z4FSWJDF QSJWBUFWBMMPDL.BOBHFS-PDL.BOBHFS \ GVODSJUJDBM4FDUJPO VTFS*E6TFS*E  \ MPDL.BOBHFSVTFS-PDL VTFS*E

    \ ઺ਃ۽૒प೯ ҕਬؘ੉ఠࢎਊೞৈ੘সࣻ೯ ^ ^ ^ 4Q&-হחੌ߈੸ੋ௏٘۽ ஹ౵ੌఋ੐୓௼оמ  ੸ਊৈࠗഛੋ੉एਕ૗
  20. !4FSWJDF DMBTT.Z4FSWJDF QSJWBUFWBMMPDL.BOBHFS-PDL.BOBHFS \ GVODSJUJDBM4FDUJPO VTFS*E6TFS*E \ JOUFSOBM$SJUJDBM4FDUJPO VTFS*E ^

    QSJWBUFGVOJOUFSOBM$SJUJDBM4FDUJPO VTFS*E6TFS*E \ MPDL.BOBHFSVTFS-PDL VTFS*E \ ઺ਃ۽૒प೯ ҕਬؘ੉ఠࢎਊೞৈ੘সࣻ೯ ^ ^ ^ ղࠗೣࣻী ੗ਬ܂ѱ੸ਊоמ  ੗ਬب֫਷࠙࢑ۅ੸ਊ
  21. ೣࣻഋ࠙࢑ۅ੄ѐࢶػ੼ ۅࠛ೙ਃ ۅ೙ਃ "01࠙࢑ۅ੄҃਋ ۅਸևѱ੟ওਸٸ ۅࠛ೙ਃ ۅ೙ਃ ۅࠛ೙ਃ ۅ೙ਃ ۅࠛ೙ਃ

    ۅ೙ਃ ୡ ೣࣻഋ࠙࢑ۅ੄҃਋ ۅਸગѱ੟ওਸٸ ୨ୡࣗਃ ۅࠛ೙ਃ ۅ೙ਃ ୡ ۅࠛ೙ਃ ۅ೙ਃ ୡ ୨ୡࣗਃ ୡ ୡ ୡ
  22. 2"