Answer the question
In order to leave comments, you need to log in
Do I understand the structure for load balancing on a VPS server correctly?
Good day!
Decided to take a closer look at Django. A fairly simple idea came to mind - image hosting. It does not seem complicated and for a start the most it seems to me.
Immediately some questions began to appear. For example, now I have a similar Storage VPS in my hands: Its
price is not very high (5 bucks in total), but for this price it seems to work out the resources. In any case, the speed of the Internet shows itself quite well.
Naturally, such volumes are just needed in order to store pictures. And here the most interesting begins.
We will conditionally assume that 1000 pictures are placed in 1GB. This means that ~500k images will fit into the available space. But what will happen next?
Now only one thought comes to my mind - to use a fast VPS on SSD disks for the very core of the site, and to distribute the load on such terabytes for the storage itself.
Iiii... is this the right approach? That is:
site.ru 1.1.1.1 - core, project itself, fast SSD drives
i1.site.ru 1.1.1.2 - HDD Storage
i2.site.ru 1.1.1.3 - HDD Storage
i3.site.ru 1.1.1.4 - HDD Storage
And when a person wants to download/view the uploaded image, he eventually gets site.ru/title.jpg instead of a subdomain (i1.site.ru/title.jpg for example)
Is this possible?
I apologize for the chaotic description of all this. The area is completely unfamiliar, I don’t even know which side to approach. That is, the project itself, then I can write on the local host, but I can’t figure out where I should perform distribution across subdomains, for example. Should I do it in the project or can I somehow do it at the system level?
Or how to do it correctly: fill one server and then the second one, or evenly fill both?
I will be glad to everyone who will prompt and direct in the right direction and in the right direction.
Answer the question
In order to leave comments, you need to log in
it’s quite normal, but on a pile of inodes VPS and you will be delighted with the load and speed)))) I’m not sure that it will quickly satisfy everyone
The browser downloads html
There are links to subdomains in html We distribute links
there so that they are evenly distributed to all subdomains
Pictures are on all servers at the same time
Steam up early.
You will have time to move to some cloud option, such as aws or Yandex clouds, which are easily scalable for such tasks.
Now the main thing is to focus on the service. And come back to this problem when you make the main functionality.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question