Does python have a module that can do load balancing?

here"s the thing. I want to write the read-write separation of mysql directly in python. If I read it, I just ask for an address. Then read it, there may be multiple mysql addresses, how to do load balancing in python? For example, the default is to distribute requests evenly, and then if a machine has a problem to avoid the request, the machine can resume the read operation of the machine after it is restored. So I"d like to ask if there is a ready-made module to use. Thank you

Nov.19,2021

Why do you want to repeat the wheel? the cloud database comes with it, and there are many database middleware that do this thing

.
Menu