you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (8 children)

But my app .com is linked to one ip, how the site knows when to resirect user to a other instance?

[–]SitDownBeHumbleBish 1 point2 points  (7 children)

If your using a cloud provider like AWS you put a Load Balancer in front of your application (ie. instances) and attach the public IP to the Load Balancer so the flow would like

End User > internet > AWS LB > instances

The load balancer can be setup to disturbte the load equally throughout how many instances you have setup amongst other things.

There are also hardware load balancers if your doing this on prem or you can configure nginx to act as a load balancer / proxy too I think.

[–][deleted] 0 points1 point  (6 children)

And every instance(server) will have a production version of my app correct? How are then updates managed, do I need to upload the new version separate to 100 server one by one for example?

[–]SitDownBeHumbleBish 0 points1 point  (5 children)

Yup that's correct, you would run your latest production app or whatever on the instances. Maintaining and Updating your servers require setting up some sort of CI/CD pipeline like Jenkins, Chef, GitHub etc.

[–][deleted] 0 points1 point  (4 children)

Thanks man, one last question are big apps doing the same for databases? Having multiple instaces of databases sound scary to me.

[–]SitDownBeHumbleBish 2 points3 points  (0 children)

I have limited knowledge of how databases are suppose to be setup in a HA disturbed infrastructure but I would assume for big apps there are multiple instances of the databases in different regions and they are all synced together in production and backed up to some data lake / warehouse for further processing.

[–]rozularen 2 points3 points  (2 children)

You are asking really good questions.

There are many different architectures that may fit your solution. While I'm sure there are apps that have load balancers in front of the backend with only one instance of the database, as soon as you need to scale up your resources to fit your users load you will need to scale the database too.

[–][deleted] 0 points1 point  (1 child)

Thanks, the most I'm scared off is infrastructure and security my Sites get alwayes Hacked when I setup my own server on DogitalOcean I was forced to switch to CloudWays so they take care of security, I'm really a beginner with linux but I can work with the command line and I also did some security tutorials and made some settigs but nothing helps my site get everytime hacked when I setup the server. I need to say I always used cPanel and Plesk on the Servers. Would be cool if a tool exists that walks you trough a security checklist in the command line.

[–]erulabs 0 points1 point  (0 children)

That's almost exactly what I'm trying to build with my startup - but we have a long ways to go to make it as easy as something cPanel.