架构设计 - Redis 如何设置存储结构?
高洛峰
高洛峰 2017-04-22 08:58:59
0
1
663

目前想的是:

  1. 使用 Redis 来做分布式存储缓存,所有分布式进程同时给 Redis 添加数据,不做唯一性的检查
  2. Redis 存储完成后,使用对比后形成增删改列表
  3. 使用队列的方式完成增删改,每形成一条增删改数据都压入队列,队列采用异步的方式完成数据的持久化

这样做是否可行?需要注意哪些?

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(1)
PHPzhong

Invited by the system.
I haven't tried the questioner's solution, but in a flash I immediately thought of a tool that also uses Redis for caching: logstash, so the questioner's solution should be completely feasible.
There is no need to add additional queues. Redis naturally provides lpushlpop commands to use the list as a queue.
Because the writing performance of Redis is very high, the subject may want to pay attention to the performance of the processing queue to prevent the memory from bursting.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template