andreyka26_se
611 subscribers
556 photos
65 videos
2 files
278 links
Hey, I'm software engineer at Microsoft, with 7 years of experience. Here we are talking about F(M)AANG big tech interviews: leetcode, system design and corpo life.

YouTube: @andreyka26_se
Instagram: andreyka26_se
TikTok: @andreyka26__
Download Telegram
Right now I'm learning a bit of domain knowledge about how Payment Gateways like Stripe work to not fuckup when I publish System Design Solution here. SO:
When customer submits card details to Stripe willing to pay merchant for his goods, what Stripe does FIRST to capture money from the customer?
(first should be authorization transaction)
Anonymous Poll
47%
contacts customer's (issuing) bank, that issued card
35%
contacts Card Network
6%
contacts Stripe's bank (receiving)
12%
contacts Merchant's (Goods/Services owner) bank
Terminology:
Stripe - payment gateway
Merchant - the guy selling goods or services
Customer - the guy buying goods or services from Merchant

Issuing / customer's bank - the bank that issued card to customer, that he pays with
Merchant's bank - the bank where merchant receives money when customer pays for it
👍1
Don't worry, by the end of the day the answers to the poll will be revealed :)
But that is interesting how people's opinions diverge
andreyka26_se
When customer submits card details to Stripe willing to pay merchant for his goods, what Stripe does FIRST to capture money from the customer?
(first should be authorization transaction)
Here the correct answer is Card Network, e.g. Visa or Mastercard, this is what first would be called. Cause Stripe might not have integration with customer's bank + it has only card details, it does not have an bank account. Whenever you charge from card you pretty much always work through the Card Network.

You can imagine Mastercard or Visa as a bridge that transfers money from customer's account (card holder) to Stripe's account
🔥2
andreyka26_se
Where Stripe transfers money when customer pays for goods?
The money is transferred to Stripe's bank account (it has multiple in different regions). If it would directly transfer to merchant - how would it collect fee/interest then?
🔥2
Gmail, seems to put some sort of "agent" inside. It detected that I mentioned "attached", then detected that nothing is attached and warned me with alert()
This media is not supported in your browser
VIEW IN TELEGRAM
👍3🔥1
Around 5-6 years ago when I started learning "Clean Code", so finished "Code Complete" by Steve McConnell, then "Clean Architecture" by uncle Bob, then bunch of Domain Drive Design books, I was under impression that this is IT, I know how to write code and keep it simple and clean.
🔥3
But the experience always was the following
😁2
Question before sleep for System Design. We can afford to be eventually consistent, but, we cannot afford data loss and want to be highly available.
🤔4
Answer to the above's will be soon
3
Daily

Not that bad, but a bit bullshit. It takes a bit long to build an intuition (I will leave hint for that in comments)

https://leetcode.com/problems/minimum-number-of-operations-to-make-all-array-elements-equal-to-1/description/?envType=daily-question&envId=2025-11-12

#daily #medium
👍3
andreyka26_se
which replication can guarantee no data loss in the case above
So, there is only 1 correct answer for all the cases:

Consensus(raft, paxos), it will guarantee everything.

Async leader follower - might loose data on leader election
Sync leader follower - does not give high availability, as any follower crash will make system unresponsive, and not able to process writes

Leader Leader - depends, if operations are not concurrent we will not loose the data and guarantee high availability, once we write to any leader it will be synced. Concurrency might bring data loss only when Last Write Wins conflict resolution.
Leaderless - same as leaderfull, if no concurrent operations - we will not have any conflict with w + r > n, but with concurrent operation, again on read repair when there is a conflict we might override some writes, that got accepted by quorum.
🔥1
Do you remember this epic game? I need to play it NOW!
🔥7👍2
andreyka26_se
which replication can guarantee no data loss in the case above
Pls, give me feedback about such polls. Did you like it, was it not useful at all, was it too hard, ambiguous? Should I continue using them, or better just posting the "results" in the way: "these are replications that guarantee no data loss"
👍7