> On 31 Jul 2017, at 22:41, bjun...@gmail.com wrote:
> 
> Hi,
> 
> i'm experimenting with some Lua code in HAProxy where i need a simple 
> key/value store (not persistent). I want to avoid Redis or other external 
> dependency.
> 
> Is there some sort of shared memory segment in HAProxy Lua integration that 
> can be used? (or is it possible to access HAProxy stick-tables from Lua?)


Adding shared memory segment in Lua is an interesting way. Adding a key/value 
system with
Lua using shared memory seems very smart, but the development of this kind of 
function
may be complicated and needs a little bit of brainstorm.

As the shared memory is local on the system, the information is not shared 
between nodes
distributed on servers.

Also I have some doubts about the right usage of these system because shared 
memory requires
lock (sem) and haproxy doesn’t like locks.




Its not possible today to access to the stick tables with other method than the 
sample
fetches and converters bindings. In other way, peer protocol requires full mesh 
connections
(I’m using 12 HAProxy, so 66 connections)

I prefer sharing data with stick tables, mechanism are already written and are 
reliable,
but the content stored is limited. Maybe a peer protocol hierarchical 
concentrator will be
welcome.




Note that, for my own usage I’m brainstorming with Redis. This software is very 
light
and fast. My goal is tracking sessions on many servers.
So I think to this behaviour:

 - Each haproxy reads the local redis,

 - HAProxy send updates message in MULTICAST/UDP and all nodes receives the 
update
   (this way may loose messages)



Sharing data between HAProxy is not so easy :-)

Thierry



> ----------------------
> Best Regards
> 
> Bjoern


Reply via email to