Search code examples
c#web-servicesclient-serverpolling

Is this server polling considered too aggressive?


I need some guidance from the more experience before I waste any money. Please see my scenario.

  • 300 clients need to check for data from a server throughout the day.
  • Each clients data will be available at different unknown times.
  • Each client may download 5kb of data up to 30 times a day.
  • It is important each client detects their available data within 5 minutes.

I don't want to force each client to setup a static IP or open port. Therefore I believe sending the data from server to client is not an option. I must come up with the most appropriate way for the clients to request the data from the server.

I have considered setting up the 300 clients to poll for their possible data every 3 to 5 minutes. Each client may download 5kb of data up to 30 times a day. They will not download data every poll.

Assuming bandwidth and speeds are not an issue and that I can get an upgrade-able dedicated server;

  1. Is 300 clients simultaneously connecting every 3 to 5 minutes considered aggressive polling?
    • 5kb of data is expected to be downloaded up to 30 times a day per client.
  2. Is this approach unreasonable with respect to network and hardware resource?
  3. Is there a better approach?

Thank you for your time.


Solution

  • It is not aggressive at all, 300 clients every 3 to 5 minutes (assuming they are evenly distributed on time) is 1.6 Request Per Second (3 Minutes) or 1 Request Per Second (5 minutes) what is nothing in regards of throughput.

    Taking in account you are only transferring (eventually) 5KB of data per client, this is not a big deal to the hardware or is going to create a bottleneck anywhere.

    If pushing from the server is out of the picture, the approach you are thinking to follow is ok.

    One alternative, between others, is to use 'Queues', for instance Topics/Subscriptions from Azure Service Bus. This will be too much for such a simple scenario, however, provides a 'proper' reliable asynchronous channel between the Service (Server) and the Clients that works in near real-time, and the bonus is you will defer all the overload to keep the communication pattern to a platform designed for this purpose.