ArticleslgStudy

computer science

HAProxy

HAProxy is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand HAProxy rather than just read about it. In short: HAProxy is a free and open source software that provides a high availability load balancer and proxy (forward proxy, reverse proxy) for TCP and HTTP-based applications that spreads requests across multiple servers. It is written in C and has a reputation for being fast and efficient (in terms of processor and memory usage).

HAProxy — main illustration
HAProxy — illustration

Key takeaways

  • HAProxy belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect HAProxy to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of HAProxy from memory before moving on to harder problems.

Reference excerpt

HAProxy is a free and open source software that provides a high availability load balancer and proxy (forward proxy, reverse proxy) for TCP and HTTP-based applications that spreads requests across multiple servers. It is written in C and has a reputation for being fast and efficient (in terms of processor and memory usage). HAProxy is used by a number of high-profile websites including GoDaddy, GitHub, Bitbucket, Stack Overflow, Reddit, Slack, Speedtest.net, Tumblr, Twitter and Tuenti and is used in the OpsWorks product from Amazon Web Services.

History HAProxy was written in 2000 by Willy Tarreau, a core contributor to the Linux kernel, who still maintains the project. In 2013, the company HAProxy Technologies, LLC was created. The company provides a commercial offering, HAProxy Enterprise and appliance-based application-delivery controllers named ALOHA.

Features HAProxy has the following features:

Layer 4 (TCP) and Layer 7 (HTTP) load balancing Multi-factor stickiness URL rewriting Rate limiting SSL/TLS termination proxy Gzip compression Caching PROXY Protocol support Scriptable multi-layer Health checking Connection and HTTP message logging HTTP/2 support on both sides HTTP/3 support WebSocket (RFC6455 and RFC8441) UDP/TCP Syslog load-balancing and forwarding/transcribing (RFC3164 and RFC5424) Event-driven Multithreaded architecture Hitless reloads gRPC Support Lua and SPOE Support API Support Layer 4/7 Retries Simplified circuit breaking Advanced debugging and tracing facilities Distributed stick-tables for stats collection and DoS mitigation

HAProxy Community vs HAProxy Enterprise HAProxy Enterprise Edition is an enterprise-class version of HAProxy that includes enterprise suite of add-ons, expert support, and professional services. It has some features backported from the HAProxy development branch.

ALOHA HAProxy Technologies’ ALOHA is a plug-and-play load-balancing appliance that can be deployed in any environment. ALOHA provides a graphical interface and a templating system that can be used to deploy and configure the appliance.

Versions HAProxy has had the following version releases:

Performance Servers equipped with 6 to 8 cores generally achieve between 200,000 and 500,000 requests per second, and have no trouble saturating a 25 Gbit/s connection under Linux. 64-core ARM servers were shown to reach 2 million requests per second and 100 Gbit/s.

Similar software Nginx Gearman Pound Vinyl Cache Envoy by CNCF

See also

LAMP, LYME, and LEAP

References

External links HAProxy Enterprise Website HAProxy Wiki on GitHub HAProxy issue tracker on GitHub

Illustrations

HAProxy illustration

Worked examples

Example 1 — a first encounter with HAProxy

Start with the simplest possible case. Write down what HAProxy claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to HAProxy before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about HAProxy ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of HAProxy

In research
HAProxy appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses HAProxy in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
HAProxy is common in secondary-school and first-year university syllabi. It links to neighbouring topics Free software programmed in C, Free web server software, Lua (programming language)-scriptable software, so understanding it makes those chapters shorter.
In everyday life
Look for HAProxy outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “HAProxy” →

How to study HAProxy in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what HAProxy means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain HAProxy out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is HAProxy in simple terms?

HAProxy is a free and open source software that provides a high availability load balancer and proxy (forward proxy, reverse proxy) for TCP and HTTP-based applications that spreads requests across multiple servers. It is written in C and has a reputation for being fast and efficient (in terms of pr…

Why does HAProxy matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study HAProxy?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on HAProxy.

Tags

  • Free software programmed in C
  • Free web server software
  • Lua (programming language)-scriptable software
  • Proxy server software for Linux
  • Reverse proxy
  • Unix network-related software

Keep exploring