While learning about what websockets are and how they work, I find it hard to understand what they mean by "concurrent connection".
Can anyone explain to me what "concurrent connection" means in a Blog web app as an example?
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.Sign up to join this community
"Concurrent connection" means the maximum number of TCP connections your server can handle at any one time. At any given time many TCP/IP requests are coming to your server. For instance a single, simple web page might require 10 connections.
If 5 people request this page at the same time it could result in 50 concurrent connections.
To add to SushiGuy's answer:
A connection is made whenever a client (i.e. a browser or a mobile app) requests a resource from a server (i.e. a web page, CSS, JS, image, etc).
From a servers point of view "concurrent connections" is the count of the number of clients that are connected at the same time.
In a traditional web page request, your browser will open a connection to the server, request and receive the HTML, close the connection, parse the html and then request the JS, CSS and Images. Browsers are typically able to open multiple connections to a server and request these resources in parallel, and then close those connections. Most are able to reuse a connection to request additional resources, but once all resources are downloaded the connections are closed. These connections are typically only open for a few seconds at most.
Web sockets impact this because they create a persistent connection between the client and the server while the client is running. So if you have 100 users running your app, they will all have at least one connection to your server open. If your server only supports 100 concurrent connections then you won't be able serve any other users, including serving the initial HTML.