• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

getting the server response time

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I have a situation like this and im a new bee.
1.I have two servers
2.The Client request should go to the first server,if it takes too much of time to respond,The request should be redirected to the other server.
Im confused about how to get the server response time...
Can some body throw some light on this....
Thanx a lot in advance
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think you're getting into a level of complexity that really may not be required. if you're using two servers you should consider a high availability hardware switch to handle the load.
consider the implications that utilising a "redirection swtich" would have on session objects (ie server1 responds initially to the client, then the client gets redirected to server2 for the next response).
to obtain the server response time you'd need to have a seperate threaded servlet running as the controller to constantly poll and measure the other two server response times. this controller would then *forward* requests to whichever server is the quickest.
keep in mind that you now need three servers (one as the controller to the other two) and also that if your controller server or servlet goes down, your application is toast.
from a browser you cannot redirect to the best server without an intemediary (controller) unless you run an applet in the browser. the applet would then send of a request to both servers, and which ever responds first, the applet would then initiate communication with.
DSR
 
archana vishwanath
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx Dominic,
It was really helpful.May be i should explain the scenario a little better.
This project is for an academic institution for a prticular department activities.They have a server inside there campus which can also be acessed by the outside world.This server is often hacked by the students over there.
Now we have an external server,and the task in front is
1.Local server is the first priority.
2.Only in case the local server is not able to respond properly,The request
has to be redirect to the outside server.
3.The solution should be very cost effective,like no third server and no hardware switch.
Also pls give some clues to get the respose times...
Thanx,
Archana.
 
I child proofed my house but they still get in. Distract them with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic