S
S
Sergey Sulakov2018-09-15 16:08:03
Scalability
Sergey Sulakov, 2018-09-15 16:08:03

Scaling a web service on rented dedicated servers with administration from the host?

There is a site located at one of their hosts on a dedicated server with their administration. Accordingly, we do not have access to fine settings. Prompt, someone faced scaling in such cases? That is, we rent another server, set up, for example, Round Robin DNS. But what about session storage in such cases? As with user-uploaded files. Session data and sites downloaded by users are stored on one of the servers (which one the user "hit"), but how to get access to them from the rest? Is it okay to rent a separate server for storing sessions and files?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Night, 2018-09-16
@web-verzus-team

The easiest and cheapest way to move to horizontal scaling:
1. Sessions are moved to Memcache, which is located on a separate server
2. The database is moved to a separate server
3. File storage, no matter how surprising it may be, is also moved to a separate server
4. The front is raised a node that proxies all requests to the backend nodes. Usually it's just Nginx
5. You raise X nodes that are completely identical to each other with your software, but without the database, cache, filestorage, the previously raised nodes for the database, cache, files are used.
6. All traffic goes to the front node, which balances traffic between your backend nodes.
7. All nodes work with a single database, with a single cache, a single filestorage.
8. The load is distributed among all nodes evenly, you are happy.
As a result, you can add as many backend servers as you like to balance the load.
Usually there are problems with the database, and then you have to balance / shard the database itself. If this is a problem, please let us know :)

I
Ivan Shumov, 2018-09-15
@inoise

1. About sessions there is such a thing as Sticky Sessions
2. About balancing - you need fully stateless services. State must be somewhere else: Cache, Database, ... But then they must also be scaled. The same goes for storage. It is worth thinking about SOA architecture
3. Cloud Computing. Clouds are our everything: AWS, Azure... But here we need a specialist who has at least minimal experience, because this world is somewhat different from what you are used to

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question