TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Exactly-Once Payments at Airbnb

9 pointsby ohduran9 months ago

8 comments

jitl9 months ago
The author didn’t work at Airbnb, this post is just a reductive summary of a 2019 Airbnb blog post: <a href="https:&#x2F;&#x2F;medium.com&#x2F;airbnb-engineering&#x2F;avoiding-double-payments-in-a-distributed-payments-system-2981f6b070bb" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;airbnb-engineering&#x2F;avoiding-double-paymen...</a><p>The original post goes into much more detail.
评论 #41282986 未加载
schrodinger9 months ago
Also don’t wanna sound grumpy but I don’t understand what’s novel or hard about this problem either. Every single e-commerce cite has the same struggle to face and they do it just fine. Of course there’s a period between storing the idempotency key (essentially beginning the transaction) and doing processing.<p>Maybe it’s just me but this sounds like some rediscovering a very very common problem that been solved thousands of times over.
csomar9 months ago
I am very confused by this article. Is it trying to explain the equivalent of PayPal `PAYMENT.CAPTURE.COMPLETED` webhook? Also, why is this such a problem for Airbnb since they don&#x27;t have to settle immediately (it&#x27;s not like someone is withdrawing crypto). If the payment failed, Airbnb has probably ample time to revert the booking (as most bookings happens days if not weeks in advance).
muststopmyths9 months ago
I hate to sound like a crochety old man, but this sounds like a huge amount of overengineering for something that could easily be put in an ACID database to begin with.<p>100,000 requests&#x2F;day is less than 2 a second. Most self-respecting databases would giggle at calling that a stretch.<p>The reason I know this is that I&#x27;ve built and maintained systems that handled millions of ACID transactions a day.<p>In tables with millions of rows. Uphill, both ways, in the snow.<p>Now excuse me while I go outside and yell at clouds, because I&#x27;m surely missing something profound here.
评论 #41282119 未加载
scherlock9 months ago
So, you use DB row locks as a shared mutex? Am I reading that right? You created a centralized mutex service that your services use to share state with the cunning use of DB row locks.
firethief9 months ago
It sounds like their architecture enables them to solve much more interesting problems than would usually be encountered in meeting their business requirements.
TZubiri9 months ago
Ok architect astronaut<p>{From:Account, To: Account, TxTimeStamp: Time, Description: String, Amount: Integer }<p>2 transactions with the same timestamp and same description? Ignore.<p>Jeez
otterley9 months ago
TL;DR: use idempotency tokens to prevent reprocessing of duplicate requests.