英文:
Front-end and back-end mixing or leave it separate
问题
有2种方法 - 同一服务器或不同服务器。两种方法都可以。
预期:哪种方法是最佳实践,为什么?
英文:
Which is the best practice on the below?
- Front-end code running in different server (Nginx or Apache httd server) and Back-end code running in different server (Tomcat Server)
- Front-end code and Back-end code running in same port (Tomcat Server). Front-end code moved to static folder in Spring Boot
Thanks
There are 2 approaches - same server or different server. Both will work
Expected: Which one is the best practice and why?
答案1
得分: 1
始终依赖于业务规则:
- 在不同服务器上运行具有分布式架构,这将带来更好的单独维护性、弹性和可移植性,但需要更多时间来开发、部署和维护多个服务。
- 在同一服务器上运行可以实现更好的服务间通信和更好的整体维护。但是,由于所有系统仅有一个服务,因此韧性较差,如果它关闭,浪费会更严重。
然而,这取决于业务规则。
英文:
Always depends on business rules:
- running in different servers comes with distribuide arquitecture that comes with better individual maintain, resilience and portability, but it requires more time to develop and mount and maintaining multiples services up.
- running on the same server have better communication beteween services, better integral mantaining. But, it has much less resilience due to has only one service with all the system, if it go off, the waste es worst.
Nevertheless, it up to business rules.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论