---
title: "RADIUS; proxy load balancing with CARP"
subject: "Internet and Intranet"
chapter: 5
key: "semester_8/internet_and_intranet:radius-proxy-lb-carp"
source: https://www.bctengineer.com/q/semester_8/internet_and_intranet/radius-proxy-lb-carp
site: BCT Engineering
---

# RADIUS; proxy load balancing with CARP

Internet and Intranet · Chapter 5: Designing Internet Systems and Servers

- Asked in: 2072 Magh, 2+8 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/internet_and_intranet/radius-proxy-lb-carp
- Whole chapter: https://www.bctengineer.com/md/semester_8/internet_and_intranet/chapter-5

## Question

What is RADIUS? Describe proxy load balancing with respect to 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.

## Answer

#### 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).

```text
 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.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What does RADIUS provide?
   A. Caching of web pages
   B. Centralised AAA: authentication, authorization and accounting
   C. Load balancing of proxies
   D. Encryption of e-mail
   Answer: B. RADIUS gives centralised AAA for users connecting through a NAS. (Key point: RADIUS meaning)

2. In RADIUS, what does the NAS do with the user's credentials?
   A. Checks them locally and never contacts a server
   B. Hashes the URL and picks a proxy
   C. Sends them to the RADIUS server, which replies Access-Accept or Access-Reject
   D. Stores them in the browser
   Answer: C. The NAS acts as RADIUS client and forwards credentials; the server decides and replies. (Key point: RADIUS flow)

3. How does CARP decide which proxy owns a URL?
   A. The proxy with the highest score from the URL hash combined with each member hash and load factor
   B. The proxy closest to the client
   C. The proxy with the lowest score
   D. The most recently added proxy
   Answer: A. The member with the highest score owns the URL; the load factor lets bigger machines own a larger share. (Key point: CARP ownership)

4. What happens to cached URLs when a proxy is added or removed in CARP?
   A. All URLs are remapped
   B. Only about 1/n of URLs move; the rest stay cached where they were
   C. No URLs move but the cache is deleted
   D. Only the most popular URLs move
   Answer: B. CARP's hashing means a membership change remaps just about 1/n of URLs. (Key point: Minimal reshuffling)

## Related in Internet and Intranet

- [Short note: Proxy load balancing](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Anote-proxy-load-balancing) — Internet and Intranet, chapter 5, asked 2×
- [Proxy array load balancing types for big ISP](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aproxy-array-lb-mechanisms-isp) — Internet and Intranet, chapter 5
- [Proxy load balancing benefits; non-redundant array](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aproxy-lb-benefits-non-redundant) — Internet and Intranet, chapter 5

## Related in other subjects

- [Balancing one mass using two planes](https://www.bctengineer.com/question.md?key=semester_7%2Ftheory_of_mechanism_and_machine_ii%3Asingle-mass-two-plane-balance-derivation) — Theory of Mechanism and Machine II, chapter 5
- [Dynamic balancing with two correction planes](https://www.bctengineer.com/question.md?key=semester_7%2Ftheory_of_mechanism_and_machine_ii%3Abalancing-masses-two-planes-numerical) — Theory of Mechanism and Machine II, chapter 5
