What could be the bottleneck to a service that relies a lot on websockets?
blendibrahimi1
FREEOP

a year ago

My project relies on websockets for real time data management and i wanna know what problems would come up when a lot of people connect with websockets at the same time

20 Replies

a year ago

is your service connecting to 3rd party websocket services, or is your service the web socket server?


blendibrahimi1
FREEOP

a year ago

N/A


blendibrahimi1
FREEOP

a year ago

I might be a bit blind


blendibrahimi1
FREEOP

a year ago

Anyways, my project just uses websockets to update data in real time on the client side


a year ago

then the bottleneck would be your code


blendibrahimi1
FREEOP

a year ago

I haven't had any problems yet, i was just wondering how to future proof it


blendibrahimi1
FREEOP

a year ago

And would it consume a lot of resources on the hosting side


a year ago

write efficent code, and that will both future proof it and take less memory


blendibrahimi1
FREEOP

a year ago

That's probably the best advice i can get


maddsua
HOBBY

a year ago

Golang is a good choice btw


blendibrahimi1
FREEOP

a year ago

Ty for the help since it did make me think about which parts i need to fix


maddsua
HOBBY

a year ago

It always is


blendibrahimi1
FREEOP

a year ago

I've been told it's easy to learn


maddsua
HOBBY

a year ago

Yup and it's somewhat hard to write inefficient code in it


maddsua
HOBBY

a year ago

I mean, you still can, however it's not as easy to do that as in js, for example


blendibrahimi1
FREEOP

a year ago

Wasn't really my choice to work with js but I was forced to use it


blendibrahimi1
FREEOP

a year ago

As for golang I've never worked with it


anisdzdev
PRO

a year ago

Note + Follow up on this thread:
I've been using an express server with socket.io and it works great as long as the connection is relatively short (less than 30min), after-which your Network Egress explodes and requests become extremely slow.

Let me know if there's a solution for this? I am thinking of using an external socket server just for this use-case.


a year ago

i would have to recommend you setup tracing so that you can have data on what is "slow"


blendibrahimi1
FREEOP

a year ago

Could it be caused from a surplus of connections and memory buildup? Were you able to fix it?


Loading...