HAProxy - Lập trình Lua và tích hợp Redis
Lua trong HAProxy là gì?
Tích hợp Lua vào HAProxy
Bước 1: Cài đặt HAProxy hỗ trợ Lua (phiên bản từ 1.6 trở lên)
sudo apt-get install haproxy lua5.3 liblua5.3-devBước 2: Cấu hình HAProxy sử dụng Lua
core.register_action("hello_world", { "http-req" }, function(txn)
txn.res:send("Hello from Lua and HAProxy!\n")
end)Tích hợp Redis vào HAProxy với Lua
Cài đặt thư viện Redis-Lua:
Cấu hình HAProxy:
Tài liệu tham khảo thêm:
Last updated