1

I'm developing an app that downloads and uploads an average of 10KB every 60 seconds. All within a single connection / second thanks to my supreme engineering. :)

Each instance of the app opens and closes a new connection every 60 seconds but fortunately the connections are short lived.

How many users before this process becomes unstable? Assuming an average of 4 hours of synchronization (240 connections) per day, per user.

I'm running on an average server that an average of 150$/year hosting plan provides.

I can't find a definite formula. All I know is that 2000 connections per seconds are a lot, yet I'm not sure.

2000 conn / sec = 120,000 conn / minute or 120,000 users.

Am I thinking right? Is there anything I can do to maximize this number?

Nick Keroulis
  • 133
  • 1
  • 6
  • If you are adding a bunch of 10KB only every 60 seconds, why do you need 120K connections per minute? For me that's only one. – Axel Amthor May 17 '15 at 08:04
  • Every instance of the app does that. Each one of the 120,000 users who runs my app will open and close a new connection every 1 minute. – Nick Keroulis May 17 '15 at 08:08
  • 1
    I think most web apps will pool database connections so the real concurrent connection number can be smaller than numbers of concurrent users. – Tim3880 May 17 '15 at 08:20
  • As long as your piece of string. Connections per second may have nothing to do wih it, or no effect at all. – user207421 May 17 '15 at 08:24
  • 1
    Most of the time the app downloads / uploads a single string to the user's row. Rarely, it does something far heavier, making full table scans and queries to each row. But, that happens once every time the app starts. It's like 3 times a day. Still, I did some nice work and everything happens within the same connection. – Vulkan May 17 '15 at 08:31
  • That work may have been too 'nice'. The container will provide a connection pool. You won't really have 120,000 users executing database queries or uodates at the same time, concurrently, and even if you do, the container pool will sequentialize them to the degree necessary to meet its own maximum connections limit. The question you should really be asking is about how to configure the container pool. – user207421 May 17 '15 at 10:06

0 Answers0