I am testing HAproxy behind Cloudflare and i would like to ask if it is possible to use cookie based stickiness ( seems best way to do it? ) using TCP mode or not?
If http mode is needed is there any sample config that will work behind Cloudflare?
Also can i use ssl pass through and cookie based stickiness in http mode?
When you need to access and modify HTTP headers, you need HTTP mode, which also means, you cannot use SSL pass-through (which means, passing on already encrypted payload).
There is nothing special regarding Cloudflare, when we are talking about cookie based stickiness. Just refer to some generic cookie based stickiness blog post like this one: