Go WebSocket Tutorial with the gorilla/websocket Package
Video Statistics and Information
Channel: TutorialEdge
Views: 33,781
Rating: 4.9101796 out of 5
Keywords: programming, tutorials, coding tutorials, tutorialedge, go websocket tutorial, go gorilla/websocket tutorial, go basic websocket tutorial, go realtime websocket tutorial
Id: dniVs0xKYKk
Channel Id: undefined
Length: 13min 45sec (825 seconds)
Published: Sun Mar 17 2019
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
Question. How do you determine how many sockets a single server can handle at one time? I am thinking if I deploy my Rest API in the cloud, and want real time updates using websockets, there has to be a way to ensure my 1 instance that I pay so much a month for can keep all those sockets open. Does the back end possibly "pause" sockets to handle a lot more of them, so to speak? Or do you just have to spin up (and pay for) a lot more instances to handle say 1000s of simultaneous connections?
Is it common for the client developer to read docs that indicate a socket will only stay open for say 10 seconds, then close, so the client should listen for a 500 or 400 or something, and re-establish the connection? Is that a typical work flow for using sockets so you can handle a lot more without having to spend a ton scaling to handle the load?
Great video! Thanks for this.
Im pretyy new in golang, and everytime I do sth I struggle to find any decent sources or tutorials and when I finnaly manage learnbit by myself, there come those great tutorials. Why cant I save up time sometimes...
I'm learning golang for web. Nice tutorial, thank you.