I have an issue related to what server to approximate for the following scenario (a real situation):

I have a server where will be stored some videos that can be accessed through a web application running on this server. There will be about 100 (concurrent) users that will use it (generally through tablet or phones, but PC's will be also included).

Can you give me some thoughts on building the hardware configuration for this server? The OS running on it will be Linux.

Thanks in advance.


The web server that I use is Apache HTTP, but it's very likely it will act as proxy for a Java server (installed on this machine of course).

Other applications that will run on this server will be:

  • an application for authentication
  • an application for administration.

This server will run also continually (24/7).


From your description it sounds like the primary use case for the server will be to stream videos to 100 clients.

Given this, the two most important sub-systems for the server will be:

  1. The network connection
  2. The storage system

To size these for performance, you need to know how much bandwidth you require - this depends on the quality of the video you will be serving. Assuming that the video is 1MB/s, for 100 users both the network and storage systems must be able to deliver 100MB/s (800Mb/s for the network) of data.

If the network bandwidth connection is greater than a single link can handle and you can't afford to increase the link speed (i.e. migrate from 1GbE to 10GbE/40GbE) then you can add more links and either aggregate them at layer 2 or use multiple IP address (one per link) and distribute the connections through the application. Also you must make sure that the data path from the server to the clients can handle the capacity, there's no point in the server being able to deliver 10Gbps if there is a bottleneck elsewhere in the network!

For the storage system, you need to make sure that it can handle both the bandwidth and the number of IOPS (IOs per second) to serve the data. From our calculation above, you will require 100MB/s of streaming reads, but because you have 100 users, the storage system must be able to handle at least 100 IOPS. If you expect the users to navigate the videos you will need much more to maintain the performance. Whilst hard drives can deliver good streaming performance when they don't have contention, I would consider SSDs when the number of concurrent accesses increases.

Beyond these basic performance characterisations, you also need to consider reliability for both the network connections and storage systems. What happens in the case of link failures or hard drive failures? If you want to continue providing service, you must have multiple links and resilient storage configuration (through RAID or data replication at application/file system level).

RAM for the storage system will help you cache the videos and take some load off the storage system, so if you expect many people to view the same video then more RAM will generally help. But if the size of the working set (the data commonly accessed) is greater than the amount of RAM on the system, don't be surprised if you don't see a great improvement.

Because the majority of the system will be delivering data via IO, you probably don't need much CPU power and so any modern multi-core CPU should be sufficient. Although you should take care that if you have multiple CPUs in a NUMA architecture, you don't overload the CPU interconnect.

Once you have the hardware, you should benchmark it to make sure it delivers performance wise. For the storage system I recommend the fio tool, it allows you to specifically test scenarios such as streaming reads with 100 concurrent readers.

Given all I've said above, you should talk with your preferred vendor and see what configuration they recommend. If you make your requirements part of the RFP (especially if you include hard requirements such as the ability to deliver a particular IO profile) then it can make it easier to resolve any failings in performance later.

When designing these systems, try and think about how the data moves through the system, and where the limitations will be.

Finally, make sure you design the system with excess capacity so you can handle both growth and peaks in traffic.

| improve this answer | |
  • This is a great answer. Just one tiny nitpick: you wrote "peeks" at the end, where you probably meant "peaks". (I'd fix it myself, but I don't have enough rep to do so here.) – a CVn Sep 13 '13 at 9:12
  • That's the kind of response that I needed. Thanks. – artaxerxe Sep 13 '13 at 9:32

It is dufficult to provide exact server config dependa upon the number of concurrent users , as it depends upon your Code and Database Optimization too .Basically you need to perform Benchmarking for your application and server so many open source tools are available to do this like

You can do Full Benchmarking as well Stack Benchmarking

Tools like

  1. ab
  2. http_load
  3. sysbench
  4. unixbenchmark

etc are available.

| improve this answer | |

Can you give me some thoughts on building the hardware configuration for this server? The OS running on it will be Linux.

yes. use the double size. </irony>

no, impossible from this stage. you could go with a 4core-4GB ram machine or mot, this really depends on what you will do with it. if you just serve downloads from filesystem then a small machine would be ok, but when it comes to java et al ... benchmark!

to be more specific you should also be more specific yourself.

  • what webserver?
  • is the server for download only?
  • additional webbased software like cms etc?
  • full LAMP-stack?
  • 24/7 needed?

i'd suggest nginx if the main purpose is delivering videos and act as a reverse proxy for your java-application. it is much more lightweight than apache and handles more concurrent connections while needing less system-resources.

for your download-section, try to avoid the webapps and serve your files directly from you reverse-proxy; this will lower the overall-needed performance.

please note that nginx has some fine modules to act as a static server for videos

regarding 24/7: do you need to ensure operations 24/7? then you'll need a failover-setup.

| improve this answer | |
  • See my edit. BTW, what do you mean by use the double size.? Size of what? And in response to your fourth question: I won't use the LAMP stack. – artaxerxe Sep 13 '13 at 8:17
  • the "double size" was ironic. – that guy from over there Sep 13 '13 at 8:45
  • :) I think you caught me. :) – artaxerxe Sep 13 '13 at 9:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.