Go-SecKill

Gin+Gorm+Redis+ETCD的秒杀系统,列举出一系列并发情况下数据竞争问题的解决方案。

MIT License

Stars
27
Committers
2

Go-SecKill

Go

1.

1.1

1.1.1

api/v1/without-lock?gid=1197

1.1.2 (syncMutex),

api/v1/with-lock?gid=1197

1.1.3 (),

api/v1/with-pcc-read?gid=1197

1.1.4 (),

api/v1/with-pcc-update?gid=1197

1.1.5 ()

api/v1/with-occ?gid=1197

1.1.6 channel

api/v1/with-channel?gid=1197

2.

2.1

  1. ClusterRedis,Redisson
  2. ETCD

2.2

2.2.1:RedissonRedis

api/v2/with-redission?gid=1197

Redis LockRedis

2.2.2:ETCD

api/v2/with-etcd?gid=1197

BlockingQueue ETCDETCD

2.2.3:RedisList

api/v2/with-redis-list?gid=1197

RedisRedisList List RedisSet Redis

2.2.4:Redis,

redisredisincr 100100 rediscase3

  1. Redis ()

  2. MQ

  • SQL
  • MQ
  • Nginx
  • CDN
Related Projects