top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

http request (no only session) replication in cluster

+1 vote
369 views

What can be done to guarantee failover in below scenario:

2 tomcats behind cisco loadbalancer
1 http request can last very long about 50 seconds - response from webservice can take so long
load is 200 requests per second
I must response in max 4 seconds more than backing webservice

is there something like http request replication ?

50 s * 200 req/s = 10.000 pending requests

if one tomcat is eg killed, can in any way other tomcat serve his requests ?
Is there any out of the box solution, eg similar to session replication ?

posted Jun 11, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

The best way to do this is to configure your load balancer to buffer responses and re-try another cluster node in the case of an unexpected disconnect.

If you can't buffer the response, then it is entirely inappropriate to re-process a request: instead, you should let the failure propagate all the way back to the client and let them decide what to do.

answer Jun 11, 2013 by anonymous
Is that just me, or does this look like a *massive* imbalance between the load, and the  resources dedicated to serve that load ?
I somehow have trouble to envision any system working in any stable way, when right from  the start it is assumed to have 10,000 requests simultaneously being in various stages of processing. Unless one would have some Google-like server farms behind the thing anyway.
Similar Questions
0 votes

Setup:
- Two physical servers each running Tomcat 7.0.42
- Brocade load balancer in front

The load balancer is set to source IP persistence for 5 minutes. This time can be changed of course.

The thing I don't understand is 5 minutes or 5 hours - at then end that time limit the user can be sent to the other server and lose data stored in the session.

So why do sticky sessions matter when session replication turned on in Tomcat? Is a performance issue?

+1 vote

In tomcat does the no . of open sockets on http port (netstat -anlp|grep 8080) is it equal to number of threads in use in tomcat .
Actually I want to understand how & when I can say that the all threads in a tomcat are fully utilized that why it is responding slow.

0 votes

I have a requirement to monitor http request/response logs. We have a embedded Tomcat 7. Could you please point out the options available to do this?.
I'm already aware of the Access Log Valve ( http://www.tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Access_Log_Valve ). But it can only log separate request headers and query params of the request body..
Would like to know if there is any better approach..

+1 vote

We have a set up like Apahce (80,443) redirects the request to Tomcat (8080) using mod_jk.

The new requirement is to route the request from the same apache to another tomcat (8090). Hence I made the different config file for apache with different ports (86,4444) and different worker for mod_jk which routes the request to tomcat.

Now the issue is when I hit the url http://:86 and after providing the credentials, it is redirecting to https://:86 and throwing the below error.

Error in browser:

Secure Connection Failed

An error occurred during a connection to x.x.x.x:86. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long)

Error in logs:

"x16x03x01" 501

[Thu Jan 08 08:22:46 2015] [debug] ssl_engine_io.c(1523): OpenSSL: I/O error, 11 bytes expected to read on BIO#1bf568 [mem: 1f3930]
[Thu Jan 08 08:22:46 2015] [debug] ssl_engine_kernel.c(1806): OpenSSL: Exit: error in SSLv2/v3 read client hello A
[Thu Jan 08 08:22:46 2015] [info] (70014)End of file found: SSL handshake interrupted by system [Hint: Stop button pressed in browser?!]
[Thu Jan 08 08:22:46 2015] [info] Connection to child 3 closed with abortive shutdown(server pritoolvca1.sw.ericsson.se:443 [2], client 153.88.164.216)
[Thu Jan 08 08:23:53 2015] [error] [client 172.17.136.153] Invalid method in request x16x03x01

Could you please suggest where it might went wrong and the way forward..

+2 votes

I have task to validate or parse following http header

Accept
Accept-Charset
Accept-Encoding
Accept-Language
Accept-Datetime
Content-Length
Content-MD5
Content-Type

lets take Accept-Language as an example , if header language comes other than en-us I should reject the request with customized code response.

let me know ways to achieve the task? can we do with any configuration files?
We are using tomcat 6.0.18

...