To Nha Notes | Jan. 27, 2021, 10:34 p.m.
The problem is, AWS RDS MySQL server is high in DB load due to using too many transaction locks by using selec_for_update method of Django framework. To solve this problem, I switched to use redis for locking by using library python-redis-lock, and the high-speed of redis could solve this problem.
But then I went to another problem, that is when the redis is reached to its max capacity in peak access, and I could not scale it up to next stronger one. Thus, I switch to use redis cluster so that I can scale out to multiple shards based on traffic of access.
And the result when using redis cluster is not as my expected yet. I was trying two patterns of redis cluster as following:
cache.t3.microcache.m6g.largeBut the second patterns is worse than the first one. And both of these patterns is worse than single node of cache.m6g.xlarge of using non-cluster redis.
So what is the cause of this bad result, I am considering below potential ones:
What do you think?