Answer the question
In order to leave comments, you need to log in
Is it possible to install Apache + MySQL on a Linux computer?
Explain if it is possible to install Apache + MySQL on a Linux computer? How many visitors will it withstand.
Let's say there is a computer:
processor 1 core, 1 GHz
RAM 1GB
How many visitors can it withstand, is there any table? What parameters should be in order to withstand 5,000 thousand users at the same time?
Answer the question
In order to leave comments, you need to log in
1. It is possible
2. It depends on the load created by one user on the site. Servers are different, as, indeed, and sites. To calculate the performance of a single site, you can perform load testing with special utilities, for example, ab (apache benchmark).
"5000 thousand users" will definitely not survive, for five million a data center is needed. ;)
I understand that you want to organize a web server on your home computer at home. In principle, this is possible. Just make sure you have a real IP at home.
In terms of load:
5,000 thousand simultaneous users, that is, 5 million users, will definitely not survive.
But 5 thousand users can be and will be able to. It strongly depends on many factors.
For example, a user behavior model. If you have large articles on your site without pictures, 50kB of pure text per page, and most users just read these articles, on average, for 10 minutes. Then, this gives a load of (very roughly) one request per 600 seconds per user online. Which gives a load of just under 10 requests per second.
The next important factor, about which he said, for example,@kryoz - how heavy is your server backend. That is, how long it takes to get the page. This is made up of many different factors: the presence and number of database calls to generate one page, the actual HTML generation process, and other work of your server application. In the end, the number of disk accesses in all these processes. Or maybe your only task is to serve static content.
Let's start with the fact that it is not known what you are going to host, maybe just distribute static. Or maybe the application is heavy on the Zend Framework.
Well, according to the system configuration, absolutely nothing. What is the architecture of the CPU? What is the RAM frequency? How many channels does she have? What hard drive? It all affects.
Apache 5000 users at the same time will not survive even on static.
But Nginx will survive.
On my experiments.
Amazon ec2.micro (approximately what corresponds to the task)
Front nginx - back - 2 workers on flask through uwsgi stupidly putting the post variable in mongo withstood up to 500 requests per second from a pair of neighboring instances.
Everything very much depends on:
0. Hardware optimization - the frequency of the processor, memory, cooling, the ability of the power supply to support iron, an uninterruptible power supply.
1. Optimization (kernel) of the OS for high loads, network settings and tcp / ip stack settings, storage (hard disk, ssd, raid array), memory.
2. Optimization of the database server for high loads.
3. Optimization of the settings of the site engine and the code of the site itself, multithreading, etc.
4. Optimization of cache settings for statics - squid, nginx.
5. Optimization of router settings - Your "link for 300 rubles" may not withstand even two dozen connections, let alone several thousand.
6. Internet connection package.
100% forgot some things, but there is a lot of documentation on all these points.
With the right settings, even such a server can handle a decent amount of connections and requests.
Good luck.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question