*
The moose likes General Computing and the fly likes interview question: how do you know which server is being used in multiserver app during production? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "interview question: how do you know which server is being used in multiserver app during production?" Watch "interview question: how do you know which server is being used in multiserver app during production?" New topic
Author

interview question: how do you know which server is being used in multiserver app during production?

Madhu Pendy
Greenhorn

Joined: Aug 19, 2013
Posts: 3

Hello,

I have been asked a question during an java developer interview.
how do you identify which server the application is using during production issue in a multi server environment?
ex: lets take Amazon has several servers, there is an production issue, to address that issue where do you check, where you start your digging about the issue.

I googled for an answer did not get any to the point answer. Please throw some light.

thanks
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10268
    
    8

Welcome to the Ranch.

I re read your question multiple times and it still does not make sense to me.
Several servers? As on application server, DB server etc? Or several nodes deployed behind some load balancer.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Madhu Pendy
Greenhorn

Joined: Aug 19, 2013
Posts: 3
hi Maneesh,
its several nodes deployed behind some load balancer.
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2342
    
  28

What does the load balancer do?
Madhu Pendy
Greenhorn

Joined: Aug 19, 2013
Posts: 3
at very external level - load balancer is , when there is heavy flow of requests , few requests will be transferred to another server(node) to address the request.
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
It seems to depend on the load balancer and its settings.

For example sticky sessions are conceivable, that is, once a HTTP session was established, it will be served by the same instance.
Shankar sanjay
Ranch Hand

Joined: Sep 14, 2009
Posts: 117
Hi,

We had the same kind of requirement, we use to print the server details in log file itself. However we were using WAS 6.1 App Server, and WAS 6.1 provide some lib to get the server details.

In simple way, you can add/print the server details in request listener itself, using request.getLocalName() or InetAddress.getLocalHost().getHostName()
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7705
    
  20

Madhu Pendy wrote:at very external level - load balancer is , when there is heavy flow of requests , few requests will be transferred to another server(node) to address the request.

That wasn't Jayesh's question - and I suspect he already knows what a load-balancer's function is in general terms.

My problem is that I'm still not quite sure what your question is: At the elemental level, a data packet usually contains a source IP address; but there are all sorts of mangling processes like NAT that may obscure it from you, so without some knowledge of what those are, it may be quite difficult to track a problem back to its identifying "server".

Perhaps you could give us some more information on what this interview question was all about?

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30377
    
150

I think this is a troubleshooting question. How do you know there is a production issue? How do you know it has something to do with one of the servers/ My guess is there would be something in the logs on that server to give a clue.

It's ok to answer a question with more questions.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

Well if a particular node is down, the load balancer UI will point that out.
If the interviewer meant without looking at the load balancer, I would say its not worth beating around the bush in a production environment.


SCJP, SCWCD.
|Asking Good Questions|
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: interview question: how do you know which server is being used in multiserver app during production?