nginx + DSCP (Differentied services)

Dani Bento dani at
Tue Dec 16 14:21:59 UTC 2014


We are using nginx-1.6 in a production environment for caching data
from multiple remote origins.

To improve our data distribution over the network we thought that using
IP DiffServ/ToS to traffic shape by backend would be useful.

We developed a small patch for the nginx core to mark packets. Because
the nginx workers don't seem to have CAP_NET_ADMIN privileges we are
using the TOS field instead of socket marks. This patch only marks
client packets and not upstream/backend packets.

Besides that, we added an X-Accel-ClassID header so that the
upstream/backend itself can choose the class id to use.

Do you find this an interesting feature to add to the nginx core? How
can we proceed and submit a patch?


Dani Bento
Direção de Internet e Tecnologia
tlm: +351 91 429 72 81
dani at

More information about the nginx-devel mailing list