0

Is there any difference between doing this:

upstream hhvm {
    server unix:/var/run/hhvm/hhvm.sock;
}
...
location ~ \.(hh|php)$ {
    fastcgi_pass hhvm;
}

and this:

location ~ \.(hh|php)$ {
    fastcgi_pass unix:/var/run/hhvm/hhvm.sock;
}

Which is preferable?

1 Answer 1

2

Using upstream allows you to do some simple load balancing between multiple backends. If you have only one backend (as seems to be the case) then it doesn't really buy you anything.

1
  • Also if you use this upstream in several places you could modify it in one place
    – Alexey Ten
    Dec 15, 2015 at 5:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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