[英]Best practice to deploy a web application
I'm building a full-stack web-application.我正在构建一个全栈 Web 应用程序。 I'm using Vue.js for the frontend, Spring Boot for the back-end, and PostgreSQL docker container for the database.
我将 Vue.js 用于前端,Spring Boot 用于后端,PostgreSQL Z05B6053C41A2130AFD6FC3BE58 用于数据库。 However, I am very curious about once I finish developing my web-application where and how should I deploy it.
但是,我很好奇一旦我完成了 Web 应用程序的开发,我应该在哪里以及如何部署它。
I listed my questions below:我在下面列出了我的问题:
Thank you!谢谢!
Choosing a cloud provider may be based on many factors: price, what services do they offer, familiarity and more.选择云提供商可能基于许多因素:价格、他们提供的服务、熟悉度等等。
The question should not be "should I deploy FE and BE separately" but rather: "what is the trade-off, for my app, to deploy them separately vs. together".问题不应该是“我应该单独部署 FE 和 BE”,而是:“对于我的应用程序来说,分别部署它们与一起部署它们的权衡是什么”。 When the code grows and gets more mature and different people/teams work on it - it makes sense to decouple BE from FE, but if it's a pet project of a single person, then deploying them together is simpler operation-wise (you don't have to coordinate deploys for example).
当代码增长并变得更加成熟并且不同的人/团队在它上面工作时 - 将 BE 与 FE 分离是有意义的,但如果它是一个人的宠物项目,那么将它们部署在一起在操作方面会更简单(你不需要)例如,必须协调部署)。
RDS supports postgres, you don't "deploy your postgres docker on RDS" but rather spin an RDS instance with postgres on it RDS 支持 postgres,你不要“在 RDS 上部署你的 postgres docker”,而是旋转一个带有 postgres 的 RDS 实例
1.Before deploying a web application besides cost, these are the following things you should consider 1.在部署 web 应用程序之前,除了成本之外,这些是您应该考虑的以下事项
2.One of the questions that arise when we talk about the web development process is, whether it is useful to keep the frontend-backend together or they should be kept separate. 2.当我们谈论web开发过程时出现的一个问题是,将前端-后端保持在一起还是应该分开是否有用。
Personally speaking, You don't have to use different servers for different components.就个人而言,您不必为不同的组件使用不同的服务器。 It will work very efficiently even if you've only a single combined server.
即使您只有一个组合服务器,它也会非常有效地工作。
If your single combined server is incapable of handling a large number of database requests and web server requests from your visitors, Optimize your back-end and front-end codes and normalize the database, Even after doing this, if there are no efficiency increases as you expected, then only you need to use two servers for both to increase your efficiency.如果您的单个组合服务器无法处理大量的数据库请求和来自访问者的 web 服务器请求,请优化您的后端和前端代码并规范数据库,即使这样做了,如果没有效率提升为如您所料,那么您只需要同时使用两台服务器即可提高效率。
The problem with different servers for different uses is cost and management.不同用途的不同服务器的问题是成本和管理。 You've to pay as double ( in most cases ) as you're paying for a single server for two servers.
您必须为一台服务器支付两台服务器的费用(在大多数情况下)。 The managing of both servers is quite difficult, if your application is large enough, you may have to appoint more than one server manager.
两台服务器的管理都相当困难,如果您的应用程序足够大,您可能需要指定多个服务器管理器。
I prefer to use a single combined server and for large-scale use, I prefer to use just a database on different servers and both front-end and back-end servers on a single server.我更喜欢使用单个组合服务器,对于大规模使用,我更喜欢在不同服务器上只使用一个数据库,在单个服务器上同时使用前端和后端服务器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.