Hi Willy,
Our client send the request to our back-end server. And the request
contains a string of user id.
So I want to write an analyser to extract the user id from request and
haproxy can stick client to server base on user id.
Now I want to configure haproxy as following
stick match userid table servers
So I add a pattern_fetch_keyword to pattern_fetch_keywords list as
following
{ "userid", pattern_fetch_userid, PATTERN_TYPE_STRING,
PATTERN_FETCH_REQ }
The function pattern_fetch_userid is declared.
/* extract the string of user id in request */
static int
pattern_fetch_userid (struct proxy *px, struct session *l4, void *l7,
int dir,
const char *arg, int arg_len, union pattern_data
*data)
Could you suggest on how to reuse the existing stickiness infrastructure
in haproxy.
Thanks and regards,
-------------------------------------------------------------
Wei Wang (Wilfred)
Tel: +86-571-2898-4429
State Street Hangzhou
5F J2 Building, 1, Road 8, Xiyuan
West Lake Science & Technology Economic Park
San Dun, West Lake District
Hangzhou 310030
P.R. China