Aspora | Senior Software Engineer | Interview experience | Rejected

aspora logo
aspora
· Senior Software Engineer (SDE-3)
August 13, 2026 · 0 reads

Summary

I interviewed for a Senior Software Engineer role at Aspora, where I was asked to design a checkout system for a flash sale; the interviewers were not satisfied with my locking approach and I was rejected.

Full Experience

I recently interviewed for the position of Senior software engineer (SDE-3) at Aspora.

First round was Resume deep dive + HLD for 90 mins. Interviewer only spent five minutes on my intro and resume and started with the HLD question. The question was to design a checkout system for a flash sale.

Main scope of the problem was limited to selling only 1 item of limited quantity(upto 75k) and allowing users to buy on first come first serve basis. We could also assume that users have the amount in their wallets and there was no need for a separate payment flow during checkout. Also, to prevent scalping by malicious users and bots.

I explained the simple design of scaled servers behind a LB and a SQL DB for storing inventory and wallet balances. To scale to potentially 1-10M users attempting to buy, I placed a queue(Kafka or SQS FIFO) to absorb the throughput and process in order. I mentioned that we can scale to 50-100 consumers depending on benchmarks, and processing the messages by taking pessimistic lock as contention/concurrent queries are guaranteed. The interview caught on this aspect of optimistics vs pessimistic locking and questioned on queries waiting for locks with pessimistic locks. They wanted me to implement and use conditional writes like below:

BEGIN;

UPDATE inventory SET quantity = quantity - {buy_qty}
WHERE sale_id = {sale_id}
AND quantity >= {buy_qty};

UPDATE wallet SET balance = balance - {checkout_amount}
WHERE user_id = {user_id}
AND balance > {checkout_amount};

COMMIT:

instead of

BEGIN;

SELECT * FROM inventory WHERE sale_id = {sale_id} FOR UPDATE;

SELECT * FROM wallet WHERE user_id = {user_id} FOR UPDATE;

-- Validate qty and wallet balance in application

UPDATE inventory SET quantity = quantity - {buy_qty}
WHERE sale_id = {sale_id};

UPDATE wallet SET balance = balance - {checkout_amount}
WHERE user_id = {user_id};

COMMIT:

They were not satisfied with pessimistic locking approach and ended the interview.

Interview Questions (1)

1.

Design checkout system for flash sale

System Design

Design a checkout system for a flash sale with the following constraints: only one item is sold, limited quantity up to 75,000, users purchase on a first-come-first-serve basis, assume users have sufficient funds in their wallets (no separate payment flow), and the system must prevent scalping by malicious users and bots. The interviewers also asked for an implementation using conditional writes to handle inventory and wallet updates atomically.

📣 Found this helpful? Please share it with friends who are preparing for interviews!

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!