# Docker + HAProxy + WebSockets

**URL:** <https://discourse.haproxy.org/t/docker-haproxy-websockets/4037>\
**Category:** Help!\
**Created:** [July 11, 2019, 9:15am UTC](https://discourse.haproxy.org/t/docker-haproxy-websockets/4037 "2019-07-11T09:15:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ciprian.craciun](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/ciprian.craciun/32/722_2.png) [@ciprian.craciun](https://discourse.haproxy.org/u/ciprian.craciun)\
**Post date:** [July 11, 2019, 10:18am UTC](https://discourse.haproxy.org/t/docker-haproxy-websockets/4037/2 "2019-07-11T10:18:06Z")

</div>

Given that the WebSocket request is “network” compatible with HTTP/1.1 and then it upgrades, it should be compatible with normal HTTP routing, thus all options should apply – at least to the initial connection request.

How to achieve sticky sessions could be accomplished like in case of normal HTTP sticky sessions, which I’ve recently described in another reply:

> [@Website not loading after logging in!](https://discourse.haproxy.org/t/website-not-loading-after-logging-in/4015/4):
>
> You’ll have to properly configure the following options: on the backend the [cookie](http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#4-cookie) option; for each server the [cookie](http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.2-cookie) option; (They are named both cookie but serve different purposes.) However, if your application requires sticky sessions, then sooner or later you’ll end-up in trouble, especially if your servers get over-loaded or start failing intermittently. (I would strongly suggest looking into the application’s manual and see if there is any way in which they can use for example Memca…

* * *

**Although given this is (presumably) a newly developed application, I think it is a considerable design flaw to require sticky sessions.**

---

_[View the full topic](https://discourse.haproxy.org/t/docker-haproxy-websockets/4037)._
