Home

Issue: 1077

Plugins called each second with HAProxy

[issue link]

Hi,

I am using the socket.io plugins as shown in the examples with Nuxt 0.10.7. It works as expected locally or on a server.

I do have a problem with the plugins used together with HAProxy :
As soon as both HAProxy and the Express/Nuxt applications are started (no browser pointing towards the server), the plugins is called once per second approximately.

In my case the plugins is used for websocket handshake. This leads to many connections (50000 in one night…) then server indisponibility.

I believe this behaviour is a bug.

As workaround, I imagine I can use io.connect() from a component in the create stage and limit occurrence with a doOnce variable located in the store.
I might not need to use the store with Nuxt 1.0. if I understand well new ssr capability implemented.

The haproxy conf file is joined, it is basic to handle websocket and ssl termination.

HAProxy conf with websockets.txt

Matthieu

This question is available on Nuxt.js community (#c942)