-1

We have a public website that also serves requests for an internal system (on a dedicated IP address). When the website gets busy, and the server load increases, all requests slow down. This is acceptable for the public site, but not for the internal system.

In Nginx (or Debian Linux), is there a way to prioritise requests such that the internal system requests would get priority?

Please do not suggest increasing the server size, caching, or similar useless suggestions.

For reference:

  • Debian Squeeze
  • Nginx
  • PHP-FPM
2
  • 3
    If they were so useless, we wouldn't need to suggest them, and you wouldn't need to mention them. Jul 12, 2013 at 1:27
  • I've had enough experience to know that people often suggest options that really don't answer te question at hand.
    – Andrew
    Jul 13, 2013 at 2:13

3 Answers 3

3

Simple answer: No.

Long answer: Clustering is your friend. It's quite obvious the server you have the website on isn't enough for the load you're placing on it.

1
  • Thanks for the short answer. We are moving to clustering, but I was hoping there was a more immediate, short term solution to buy us some time.
    – Andrew
    Jul 13, 2013 at 2:15
0

You cant prioritise, but you can limit external request and allow all internal request or from some ip, maybe whit limit_req and proxy pass, but likk Nathan say make a cluster is the easy way.

1
  • The problem is knowing what to limit the requests to. We can easily handle 40+ req/sec sometimes, and only 10req/sec other times.
    – Andrew
    Jul 13, 2013 at 2:11
0

Is is possible to "prioritize" by pinning resources, with a little effort.

  1. Launch 2 separate nginx instances
  2. Use CPUAffinity to pin some CPUs on each (like 90% CPUs to public, 10% to private).

This ways, you make sure that some resources are always reserved/prioritized to specific process (here a specific nginx process).

https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Scheduling

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .