我们的移动应用程序跟踪用户事件(事件可以有多种类型)
每个报告用户事件及以后的移动设备都可以检索它。
我想写给 Redis 和 Mysql。
当用户请求时:
1. Find on Redis
2. If not on Redis find on Mysql
3. Return the value
4. Keep Redis modified in case value wasnt existed.
5. set expiry policy to each key on redis to avoid out of mem.
问题:
1. Reads: If many users at once requesting information which not existed at Redis mysql going to be overloaded with Reads (latency).
2. Writes: I am going to have lots of writes into Mysql since every event going to be written to both datasources.
事实:
1. Expecting 10m concurrect users which writes and reads.
2. Need to serv each request with max latency of one second.
3. expecting to have couple of thousands requests per sec.
这种机制有什么解决方案来获得良好的 qos 吗?
3. Is that in any way Lambda architecture solution ?
谢谢你。