Skip to main content

RADIUS; proxy load balancing with CARP

Short answer

RADIUS is a protocol/server for centralized AAA (authentication, authorization, accounting) over UDP, used by NAS. CARP is a hash-based proxy array protocol: each URL is hashed with member names, the highest score weighted by load factor owns the URL, so no duplication and only 1/n URLs move when a proxy changes.

What is RADIUS? Describe proxy load balancing with respect to CARP.

What is RADIUS?

RADIUS (Remote Authentication Dial-In User Service) is a client/server protocol (RFC 2865, UDP ports 1812 for authentication and 1813 for accounting) that provides centralised AAA: Authentication, Authorization and Accounting for users who connect to a network. A Network Access Server (NAS), such as a dial-up server, VPN gateway, Wi-Fi access point or switch, acts as a RADIUS client and sends the user credentials to the RADIUS server, which checks them in its user database and replies Access-Accept or Access-Reject.

Proxy load balancing with CARP

CARP (Cache Array Routing Protocol) is a hash-based protocol that divides the URL space among a group of proxy servers (a proxy array), so each URL is assigned to exactly one proxy. It was developed by Microsoft.

Operation

  1. Every proxy keeps a membership list of the array (retrieved periodically from the array table).
  2. For each member, a hash of the proxy name is computed once.
  3. For a request, a hash of the URL is combined with each member's hash and a score is computed.
  4. The member with the highest score is the owner of that URL. A load factor multiplies the score, so a bigger machine owns a larger share.
  5. A client-side proxy-aware browser (PAC script) or a front-end proxy forwards the request to the owner.
  6. The owner returns the cached copy (hit) or fetches from the origin, caches and returns it (miss).
 Browser / front proxy
   score(P1)=h(URL,P1)*L1
   score(P2)=h(URL,P2)*L2   -> highest = P3
   score(P3)=h(URL,P3)*L3
        |
        v
     [P3 owns URL]  --> cache hit or fetch origin

Why CARP gives good load balancing

  • Requests are spread evenly by the hash, and weights tune the share.
  • A single copy per object: the cache of all proxies adds up, with no duplication.
  • No inter-proxy ICP queries, so less traffic and delay.
  • Fault tolerance with minimal reshuffling: when a proxy is added or removed, only about 1/n of URLs move; the rest stay cached where they were.
  • Easy scaling: new proxies are added to the array table.

Limit: no copy redundancy, so the content of a failed proxy is lost until refetched.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Internet and Intranet chapter 5 questions →