5 ms·
Deploying a Production Grade Web App is very subjective and can be done in may different ways. Some of it also depends on the specific tech stack you are using
by codegeek 2y ago
Deploying a Production Grade Web App is very subjective and can be done in may different ways. Some of it also depends on the specific tech stack you are using (JS vs PHP etc).
What you need is to first learn some basics of few things:
- Web Servers (nginx, Apache, Caddy etc). They usually process request and then pass them on to what we usually call "App Servers". For some languages like PHP, you will need additional service like PHP-FPM or Wsgi for Python as web servers like nginx/caddy cannot directly process those.
- App/API Server. The server actually running the application and/or APIs (.e.g a PHP or PYthon or Typescript app).
- Load Balancers: Optional but usually a good idea for Production grade apps where you at least have 2 App Servers under the Load Balancer. Some platforms can auto scale it. For example, AWS ECS (using containers) or Heroku (dynos). Usually these are the entry points for an external User Request.
- Database server: Usually where you Db is hosted. Most people go with hosted solutions such as AWS RDS etc.
- A way to deploy your code changes to the App Servers. Usually connected with a version control like Git. Fancy term is CI/CD where you can do code changes automatically through Git etc using certain configuration files.
Note that technically, you can do all of the above on an actual single hardware/machine but usually they are set up separate.
However, before deploying, you need to build. For someone like you, I highly suggest starting with a tested framework with batteries included (e.g. Laravel for PHP, Django for Python, rails for Ruby etc). These frameworks also provide great deployment options. For example, laravel has forge which basically does everything for you in terms of deployment.
Everything else will be noise for you including things like Kubernetes etc. Don't even worry about those until you have a need (most don't).