Hi Willy.

Am 04-06-2015 17:42, schrieb Willy Tarreau:
Hi all,

while discussing with Emeric about what is changing in 1.6, we
were speaking about appsession which doesn't make much sense
anymore given that it is not replicated between nodes and almost
all it does can be done using stick tables.

So the question is : does anyone have a strong objection against it
being removed in 1.6 ? (don't cry too much Aleks, your first contrib
used to be useful for more than 10 years). And if anyone is currently
relying on it, is there anything there that you cannot do using stick
tables ?

Well yes 10 Years is a long time ;-)
HAProxy is much much flexible then the at the point when we added the appsession feature.

I'm proud that this part survived for so long time.
As before with the hash table handling I have the product point of view and if there is a better solution for the same use case im fine with the decision to remove legacy config options.

We talked in the past to be able to share the session across n processes or servers and the peers framework offers this now.

I have identified that it can match a cookie name prefix (not sure
anyone has ever needed this after 2005 or so), and the ability to
match the cookie name in the path split on semi-colons (something
we could easily do by providing a new fetch method).

It would be nice if we can add in the documentation a replacement example. It could also be a example in the test or in the example directory for a this use case.

Due to the fact that I don't use haproxy any more in the intensity as before I try a first shot for a pseudo config example.

--------
appsession <cookie> len <length> timeout <holdtime> [request-learn] [prefix] [mode <path-parameters|query-string>]
--------

I think this could be the statements which can be used to replace the "appsession".

https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4.2-stick%20store-response
https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4.2-stick%20store-request
https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4.2-stick-table%20type
https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#7.3.6-cookie
https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#7.3.6-set-cookie
https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#7.3.6-path
https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#stick%20match


fronted session_sticky
....
  stick on path_sub OR url_sub ??? (JSESSIONID,;)
  stick on cookie(JSESSIONID)

backend http
...

  # init the appsession table
  stick-table type string len 52 size 10m expire 3h ...
  appsession              ^^^^^similar    ^^^timeout 3h

  # save the Set-Cookie or Set-Cookie2 sessionID from the server
  stick store-response cookie(JSESSIONID) ....
  appsession           ^^^^^ first param

  # save the URL param sessionID from the server
  stick store-response path_sub OR url_sub ??? (JSESSIONID,;)
  appsession [mode <path-parameters|query-string> ]

  # save the URL param sessionID from the server
  stick store-request cookie(JSESSIONID)
  stick store-request path_sub OR url_sub ??? (JSESSIONID,;)
  appsession [request-learn]


What could be the solution for this arguments?
 [prefix]

I'm interested in any feedback on this.

Thanks,
Willy

BR Aleks

Reply via email to