Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I was just wondering if we can implement the failover concept in client-server models?

I was reading documentation but could not really found anything much useful.

Any kind of help on backup servers and failover might be really helpful.
It might help to be more specific about what you mean, what your app is, where it runs, etc. I'm not sure why you'd think this is really a programming thing - it's more about infrastructure. Running multiple instances of the app and load balancing across them is a standard thing and if you're deploying a web app to some cloud platform, they usually have a way to specify the number of instances and do the load balancing for you. There are lots of useful ideas in the book Release It! by Nygard.
I have made a client server model on PY-Charm where I implemented multithreading.

Then I tried to make a file transfer between the client and server.

Until now, server was always available. Now I am thinking to apply the backup server concept. If the main server fails, then clients will c0ome to know and secondary server resumes the operation and starts handling clients.

This is what I am thinking to implement. Not sure if how this is possible in Python.

I do not want the exact code but just a reference code or the APIs or some direction where to look at?
You still seem to be under the impression this is a code-level concern. It isn't. It's about infrastructure. Look into load balancing and running multiple instances for redundancy.

OK. I am not exactly sure how to do that. I am under the impression that I have to create a new backup server that will essentially perform all the activities that were carried out by the primary server.

The client will have to open a separate socket for connecting to the secondary server when the primary one fails.

Could you please guide me if I am right? I know something is definitely wrong here but not exactly sure what?
I have tried searching for something related on Internet but did not really find anything at all for this.
So, I am not even sure where to exactly start from.
I would check out VMware Vsphere if you want to implement a failover infrastructure.
(Apr-18-2021, 09:51 PM)Tyrandis Wrote: I would check out VMware Vsphere if you want to implement a failover infrastructure.

Thank you so much., I ll take a look into it

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020