A content-aware switch can optimize cluster-based server architectures by examining requests and distributing them to servers on the basis of application-level information. A network-processor-based switch can reduce HTTP processing latency and improve packet throughput.