Prioritization for a specific website.

Issues related to configuring your network
Post Reply
Kunwar
Posts: 55
Joined: 2014/08/28 23:21:43

Prioritization for a specific website.

Post by Kunwar » 2015/09/19 08:49:34

I am using centos 7 with squid (Transparent mode). This server is acting as Proxy server and I was wondering if there is any option that can help Prioritize a specific website?

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Prioritization for a specific website.

Post by aks » 2015/09/21 16:13:16

Implement QoS on your network?

Kunwar
Posts: 55
Joined: 2014/08/28 23:21:43

Re: Prioritization for a specific website.

Post by Kunwar » 2015/12/05 10:46:30

Yeah QOS. Can we do that with centOS?

trickyearlobe
Posts: 2
Joined: 2015/12/05 20:05:02
Location: UK

Re: Prioritization for a specific website.

Post by trickyearlobe » 2015/12/06 14:10:40

I'd love to give you a simple answer but actually, prioritisation is a pretty complex subject (particularly on the internet which is a bit like the "wild wild west")

DSCP marking is the most common way to indicate how a packet should be treated by routers on its way across the network.
  • DSCP marks can be applied to transmitted packets by iptables (not sure if firewalld can also do it in CentOS7).
  • DSCP marks work well in corporate networks but are sometimes stripped off or ignored by ISP's
  • The meaning of DSCP marks are not always consistent across ISP's
  • DSCP marks must be applied by both client and server to have them apply in both traffic directions
  • See https://en.wikipedia.org/wiki/Differentiated_services
RSVP is a less commonly used mechanism for "bandwidth reservation"
  • RSVP requires the client to ask for a specific amount of bandwidth
  • Routers on the way to the server may grant or reject the request (depending on how busy the network is)
  • This mechanism is more likely to be used in corporate networks. It's very rare on the internet due to lack of co-operation across ISP's
Once traffic is marked with DSCP or guaranteed by an RSVP agreement, the actual work of prioritisation is done by routers along the way using "policing", "shaping" and "queueing". The prioritisation takes into account other factors apart from RSVP/DSCP such as congestion, bandwidth that has been paid for etc. Most of this can be achieved in a CentOS router using TC and TCNG.
See http://www.tldp.org/HOWTO/html_single/T ... s-iproute2 for more info.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Prioritization for a specific website.

Post by aks » 2015/12/07 17:18:16

Actually more specifically, in the Internet, the priorities and so on made by intermediate carriers (i.e.: network operators) may not match yours (and often don't). As a made up example, if I'm a network operator and can send your data (you may or may not be my direct customer) down one of two different network paths, one is "quicker" but more expensive and the other is "slower" but cheaper, the data will probably end up going down the "slower" cheaper path (which may still match your required timings anyway), regardless what the QoS bits in your packet header say. There is absolutely nothing you can do about that. I guess you could enter into an agreement with your ISP and they enter into an agreement with their upstream ISP and so on, but that won't scale and would be very, very expensive to do.

Post Reply