Home > Back-end >  Help under the analysis of the problem, and what is the optimal solution?
Help under the analysis of the problem, and what is the optimal solution?

Time:10-06

Problem: the system receives data in perfect condition, exist in the redis first; Secondly by timing task (2 minutes) logic to handle insert mysql query for redis data; Redis don't hang up regularly, customer feedback is always push failure; There are 32 w of the last query redis data, melt all;

Bosses guidance, is there any way to optimize this problem?

CodePudding user response:

Don't know what will work cloth redis cluster

CodePudding user response:

See the system logs, the collapse of Redis reason is what?
Estimate the memory usage is too high

CodePudding user response:

Performance machine to gather together enough
Plus the machine and the machine

CodePudding user response:

reference 1st floor pinoco response:
don't know what will work cloth redis cluster

The current redis cluster

CodePudding user response:

yellow black bears evil reference 4 floor response:
Quote: refer to 1st floor pinoco response:
don't know what will work cloth redis cluster

Current redis cluster is
sentry mode, master-slave server automatically switch, not said redis hang up, lead to the failure to push it

CodePudding user response:

Why hang up a cause, make sure redis use cluster, see redis is uneven distribution of the key? Machine configuration, is not very good, put in storage after delete unused key in time, or consider using queue processing incoming logic, there is no other queue, redis can also perform a queue, the redis5.0 stream of new data types,

CodePudding user response:

The
refer to the original poster yellow black bears evil response:
problem: system receives data in perfect condition, exist in the redis first; Secondly by timing task (2 minutes) logic to handle insert mysql query for redis data; Redis don't hang up regularly, customer feedback is always push failure; There are 32 w of the last query redis data, melt all;

Bosses guidance, is there any way to optimize this problem?


Don't fall library for sen? Redis is very sweet, I think is wrong, in a redis

CodePudding user response:

The business scenario with mq not sweet

CodePudding user response:

This scenario to consumers is too slow, completely don't need to use regular task, directly get a thread pool polling, redis queue data structure model

CodePudding user response:

This should not use mq?

CodePudding user response:

Redis cache out policy is:
Volatile - lru: choose from data set the expiration time is not commonly used, to delete, for no set the expiration time is not eliminated
Volatile - TTL: in addition to eliminating mechanism adopts the LRU, strategy is basically similar to volatile - LRU, choose from set expiration time of the data set will be out of date data eliminated, TTL value, the bigger the priority to be eliminated


Can try
  • Related