参考
https://github.com/GuoZhaoran/spikeSystem
https://github.com/zaiyunduan123/springboot-seckill
秒杀系统设计与实现
1、下单扣减库存。
存在问题:
并发量起不来、如果用户不支付,就会少卖。
2、支付扣减库存。
存在问题:
并发起不来、很多订单支付不了,超卖。
3、预扣库存。
优化后架构演进过程
todo,实现代码:
参考
https://github.com/GuoZhaoran/spikeSystem
https://github.com/zaiyunduan123/springboot-seckill
存在问题:
并发量起不来、如果用户不支付,就会少卖。
存在问题:
并发起不来、很多订单支付不了,超卖。
优化后架构演进过程
todo,实现代码: