Categories
SysOps

How to enforce dynamically generated passwords for basic authentication

Use HAProxy with Lua to enforce dynamically generated passwords for basic authentication.

Categories
SysOps

How to serve single file using HAProxy

Use simple HAProxy configuration hacks to serve a single static file.

Categories
SysOps

How to merge multi-process HAProxy statistics using GNU Awk

Merge multi-process HAProxy statistics using GNU Awk. This is a duct tape solution, as you should definitely use Lua.

Categories
SysOps

How to merge multi-process HAProxy statistics using Lua

Merge multi-process HAProxy statistics using Lua.

Categories
SysOps

How to use HAProxy stats socket

Use HAProxy stats socket to determine current application status.

Categories
Uncategorized

How to mark which backend server is used

There are use cases where you need to know which backend server is used, so use specific header to send target server name to backend.

Categories
Uncategorized

How to stop requests with empty or incorrect host header

Handle domains that are not defined in the configuration using dedicated backend.

Categories
Uncategorized

How to define backup backend in HAProxy configuration

Define backup backend in HAProxy configuration to choose used backend depending on the number of usable servers.

Categories
SysOps

How to aggregate weekly data to create custom statistics

Recently, I have parsed logs of several applications to generate custom weekly reports. It was a fascinating exercise.

Categories
Uncategorized

How to use HTTP host header to choose HAProxy backend

Dynamically choose HAProxy backend depending on the HTTP host header, Lua programming language and environment variable.