With a hardware LoadBalancer, you can configure sticky sessions which will make sure the same session will always go to the same server.
But will this work with webservices also (rather than webservers)?
i.e. I have WebServices hosted behind a Load Balancer.
Will Webservice calls coming from different native clients (not browser clients) always go to the same webservice server?
These are very old style Webservices - uses RPC/Encoding - the native client program uses Axis 1.4 for the client stubs.
3 Answers
Answers 1
Webservice calls coming from different native clients (not browser clients) always go to the same webservice server should be possible.
To maintain the session stickiness, mostly load balance inject the server identifier in cookie while responding back to the client(kindly note cookie is not a browser feature it is HTTP feature defined by this specification) and should be supported by the HTTP client which is used by Axis 1.4 underneath).
I suggest you to to analyze how your load balance works and based on that you may have to change your needs to change your clients. If your load-balance uses the cookie based approach, this answer you may found useful.
Hope this helps.
Answers 2
If you can keep your application stateless,make it it's good in both performance and scalability.
Benefits of stateless :
Scalability. You can have as many servers as we want without having to share a user session. Each of them can process request (e.g. load balancing via round robin).
Saves server resources. We do not need to allocate memory on the server side (again - scalability).
No need to recover after a server restart.
Session stickiness can be tricky to get right. For example, if your web servers are running on multi-core machines, and you have several processes handling web traffic, you'll need a way to be sticky to both a specific machine and a single process on that machine. So make sure your system degrades well in cases where stickiness doesn't work correctly.
Good discussion you can find here : Sticky and NON-Sticky sessions
Sticky session pro and cons : Pros and Cons of Sticky Session / Session Affinity load blancing strategy?
Now come to your question :
Will Webservice calls coming from different native clients (not browser clients) always go to the same webservice server?
Yes in sticky session .
These are very old style Webservices - uses RPC/Encoding - the native client program uses Axis 1.4 for the client stubs.
Session configuration you need load balancer/server and it can handle any old or new type of applications
this work with webservices also (rather than webservers)?
No its configuration you need to make on server level.
Answers 3
It will work as long as your native client correctly manage the session, ie. set the correct http header for each request.
Generally sticky session is managed by the load balancer by modifying the session cookie to add the server identity.
There must be a dedicated documentation for your load balancer.
0 comments:
Post a Comment