Search code examples
databasehttpconnectionirc

How to connect more than 10,000 computer to a server?


I want to make a program that give some good services to my users and the program will check for an update one time per 2 or 3 days so my problem is that I want to be able to connect all my users to a server to be able to (make instant updates , get instant statistics , send them some files , add some chat rooms , ...) somethings like that but the problem that I don't know the best way to do that . it's not a problem any programming language I will use because I'm not alone in this project so I'm waiting for some ideas how to connect more than 10,000 Computers to my server ?

What I'm thinking about (and what I know) :

HTTP : if I will connect all of them to an http server it's could not handle all of them and it will do if it's very powerfull but it will be very expensive

IRC : is able to connect to many computers more than 200 Clients with 512 RAM but I don't know any type of server to connect to 10,000 users (in general I don't have many ideas)

DataBase : I think it's a good idea but could it connect to 10,000 Computers ? and what is the best site to host one of them ?


Solution

  • Rather than have the users connected to the sever permanently, I would use a web server and make REST calls from the client application for each discrete operation that it needs to perform with the server.

    If there are 10,000 people using your application then they will only generate REST calls when they are doing something that needs to send or receive a piece of information to/from the server. So the server won't necessarily need to handle 10,000 concurrent connections. You may find that you only have 1,000, or even 100 concurrent REST calls using this approach.

    REST is a fancy name for making HTTP GET/POST requests to a web server. It's typical nowadays to encode any data you are sending/receiving as JSON. To use the RESTful pattern, in your application you would connect to the web server, make a HTTP (or HTTPS) GET/POST to receieve/send some data and then disconnect i.e. you connect, do a single GET/POST, and disconnect rather that stay connected.