简体   繁体   中英

Socket.io keeps polling to establish connecting

I'm trying to setup a messaging application working with Socket.io.

Currently we're facing an issue with setting up our application with a reverse proxy in the middle. When we run our application locally then we've got no problem but when putting the reverse proxy in between it keeps on socket.io keeps on polling. So it's constantly polling and no data is flowing through the long-polling connection.

Has anyone faced this before? What type of configurations have we missed?

Edit 1:

This is a screenshot from the socket io client logger 套接字io客户端记录器

This is a screenshot from the network tab where it keeps polling:

网络标签

Edit 2:

We use socket.io in polling transport mode only. So we don't try to setup a real websocket connection.

It turned out it had to do with caching of the socket.io requests in Akamai. In the routing rules an explicit no cache behaviour needed to be declared.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM