Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using resin(tomcat) back in nginx(apache) parse JSP file only,like this:

        location ~ \.jsp {
            // 88 is resin(tomcat) port
            proxy_pass   http://localhost:88; 
        }

should I activate keepalive in resin(tomcat)?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

No, well you can, but it would be pointless.

NGINX doesn't support keep-alive to backend servers.

It is an HTTP/1.0 proxy without the ability for keep-alive requests yet. (As a result, backend connections are created and destroyed on every request.) Nginx talks HTTP/1.1 to the browser and HTTP/1.0 to the backend server. As such it handles keep-alive to the browser.

(NGINX Wiki)

If you're going to enable keep-alive do it in NGINX to the client, enabling it on the Tomcat side won't do anything if NGINX is sitting in front

share|improve this answer
    
recent versions of (nginx >= 1.1.4) support persistent connections with backend –  SaveTheRbtz Dec 3 '11 at 14:10
    
@SaveTheRbtz The latest stable release is 1.0.10, 1.1.4 does support it but it's 1) not yet (fully) documented and 2) development so shouldn't be used in production. Though it has interesting potential –  sam Dec 5 '11 at 9:20
    
Untested software should not be used in production. If it passed tests is there any reason not to use it in production? Difference between production and development versions is pretty ambiguous. –  SaveTheRbtz Dec 5 '11 at 18:44
    
@SaveTheRbtz If I was even caught using development versions of software I'd be screwed, let alone if something went wrong. Development is probably fine for home servers, playing around and small companies, but regardless the actual differences, when dealing with enterprise, unless it's "stable", using it in production is a definite no. In fact, we can only install software on our servers that has been out and stable with no un-patched, known bugs for 6 months. –  sam Dec 5 '11 at 22:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.