Python Forum
Failover - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Networking (https://python-forum.io/forum-12.html)
+--- Thread: Failover (/thread-33243.html)



Failover - Anan - Apr-08-2021

I was just wondering if we can implement the failover concept in client-server models?

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


Any kind of help on backup servers and failover might be really helpful.


RE: Failover - ndc85430 - Apr-09-2021

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.


RE: Failover - Anan - Apr-09-2021

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?


RE: Failover - ndc85430 - Apr-09-2021

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.


RE: Failover - Anan - Apr-10-2021

Hi,

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.


RE: Failover - Tyrandis - Apr-18-2021

I would check out VMware Vsphere if you want to implement a failover infrastructure.


RE: Failover - Anan - Apr-20-2021

(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