79081138

Date: 2024-10-12 13:57:49
Score: 0.5
Natty:
Report link

Talking from Redis usage perspective, less grasp on the others:
What is the gain with using many connections to the same server?
You can have some pool depends on the implementation of the client you use, but creating a connection per request is useless.
You should understand the limitations, use the maximum amount of connection Redis server can efficiently handle, and re-use the same connections.
You should also understand the architecture of the client you use, if it is a multiplexer for example, even more than one connection is useless.

Having more and more connections sending more requests of what Redis (or MYSQL for that matter) can serve is just misusing of resources, its using a private car for each request and sitting in traffic instead of all moving to public transportation, its not faster, and you need much much more resources.

If you need more TPS you should scale up Redis, move to cluster mode and add more replications so you can read from more endpoints and the traffic has "load balancing" between shards, the amount of connections should be almost constant compare to the amount of nodes the cluster has.

With the proper usage Redis will be much faster than the requests getting in (Valkey, the OSS fork of Redis, just announced Valkey 8 with 1million TPS, that's more than most apps need, and its not require connection per request).

I guess the same is even more true for MySQL, the amount of connection should be determined by the ability of the DB to serve requests and a small margin, there's no logic holding more.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: avifen