How to set up a server samp ddos

How do you compensate a DDOS attack with a larger server service capacity?

Oh yes, your question was actually a completely different one

Distributed hosting? wrote:

But how is this implemented on the hosting side?
Does a web server run on each of the 30 computers and if so, do they all work with a single server that manages the database or are there several servers with one database each?

So how do you have to imagine distributed server hosting, how is that implemented?

It's often not that easy.
And as always: it depends.
On the type of application and of course on how it is implemented.

Applications where the users work more or less separately next to each other are usually not a bad problem. Data that the users can access together can usually be cached or replicated well. For example a search index. There you just put several servers on which the same index is on it, and then again several servers with which the users connect. If the index is not "live", that's enough. If the index is to be more or less "live", i.e. constantly indexed data is changed, and these changes are to appear immediately in the search results, then you have to be tricky. If the load is not too great, you can simply use a DB as an index that you "push" to several search slaves via replication / log shipping / .... When you have reached the limit of such a setup, you have to resort to ... "more creative" solutions. I could imagine, for example, that the index is split into a "static" and a dynamic part. The "static" part is completely regenerated every few days and distributed to the various servers. And in the dynamic part you only record documents where something has changed since the last "rebuild" of the static part.
You then have to search in both indices, and then "merge" the result accordingly.

A real problem, however, are applications where users interact very directly with a large number of other users. Imagine, for example, an online game with an open world without "borders" (i.e. without portals / gates / entrances / ...) or other subdivisions (different planets / ...). Where users can walk around freely, take things (so that they are then no longer there for other users), put them down (so that other users can see / take them afterwards), knock other users off, etc.
There are then no longer any "natural" limits where the system can be split over several servers.
Which is probably the reason that there are hardly any such games.

Back to what you wrote, i.e. several application servers with a central database. If that works, i.e. if the central database is strong / fast enough to serve all users' requests at the same time, then this is a very simple solution. However, it is not suitable for all applications, or not without further tricks. And ... if you program the application in such a way that the data exchange runs purely via the DB, then you get the problem that the DB is overloaded before the application server goes to its knees.