this post was submitted on 22 Nov 2023
2 points (100.0% liked)

Self-Hosted Main

515 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS
 

Hello, there is this online shop we are working on, however when big discounts come, the server cannot handle all of the requests. I was thinking of using multi-server website, to use reverse proxy or dns settings to load-balance the traffic, but to have them all connect to a single external database, so all the requests and the quantity of the products get refreshed in real time.

Is this the correct way to do such thing?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 11 months ago

No. You can scale horizontal or vertical. Beefier servers or more servers. Get a DB that supports multi read/write to all instances in a cluster like CockroachDB. Use a caching layer like Redis and use lots of web workers for the incoming connections. Spread the load. Use Traefik or nginx as additional caching. Do not use static content on your cluster but use a CDN for that.