Y
Y
Yoshinon Eared2018-10-02 21:22:52
Django
Yoshinon Eared, 2018-10-02 21:22:52

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
5bb3b42f950c1703977567.png
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

4 answer(s)
D
Dimonchik, 2018-10-02
@Aquinary

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

S
sim3x, 2018-10-02
@sim3x

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

P
Puma Thailand, 2018-10-03
@opium

In your case, it's just too early to think about it.

D
Dirlandets, 2019-06-06
@Dirlandets

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 question

Ask a Question

731 491 924 answers to any question