D
D
Drottarutarnum2020-11-19 02:07:30
.NET
Drottarutarnum, 2020-11-19 02:07:30

How to keep thousands of processes?

It is planned to make a service (bot) that connects to the API of different sites (each connection is through a proxy).

The service must keep all connections active so that the bot responds to updates (message autoresponder, periodic news check, etc.).

There will be up to 5-8 thousand such connections at the same time. Used by NET.Core.

Any advice you have on architecture, what kind of server, how to implement, etc.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
BasiC2k, 2020-11-19
@BasiC2k

You will not have so many active connections at the same time. Http protocol usually contains a request and a response. After the answer, the connection is dropped.
To begin with, determine - how often do you need to make queries (how often the data is updated)? For example, requesting the exchange rate of the Central Bank of the Russian Federation at night and every 5 seconds does not make sense.
In general - break the general task into categories, choose a solution. And there, even with the load, specifics will appear, it will be possible to understand what kind of iron is needed.

R
Roman Mirilaczvili, 2020-11-28
@2ord

You don't need that many processes. To do this, they manage the threads of one process.
To handle many HTTP requests, you can get by with multiple processes (as Nginx does). Information can be updated in processes independent of the bot - workers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question