• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Madhu Pendy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Maneesh,
its several nodes deployed behind some load balancer.
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does the load balancer do?
 
Madhu Pendy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 1043
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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()
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
author & internet detective
Posts: 40913
840
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic