英文:
In system design, when saying distributed system, do we mean distributed database system?
问题
例如,如果我在我的应用程序中有一个单独的数据库,但在负载均衡器后面运行多个应用程序实例。这是否被称为分布式系统?
如果是这样,那么这个系统是否会违反CAP定理?数据库中没有分区,因此我们在那里实现了分区容忍性,可用性和一致性。
英文:
For example, if i have a single database in my application, but multiple instances of application running behind a load balancer. Would that be called a distributed system?
If so, wouldn't this system be violating the CAP theorem. There is no partition in database so we achieve partition tolerance there and availability and consistency.
答案1
得分: 0
"Distributed system" 只是一种含糊的表述,没有明确指出是指数据库方面还是Web服务器方面,或者是指特定的组件,只是指系统中存在一般的 "分布式" 方面,但这个术语本身并不意味着与数据库有关。
关于你提到的系统示例,在这种情况下,尽管你有多个冗余的Web服务器,但在DB服务器中仍然存在单点故障,如果它宕机,整个系统将宕机。因此,CAP定理仍然适用。
英文:
By saying "Distributed system" only you leave some ambiguity in it, in the sense that you don't specify if you're refering to the database aspect or the web server of it, or to any particular component, just that there is a general "distributed" aspect of it, but the term, all by itself, doesn't implies database in any way.
About your particular example of system, in that case you won't have availability, even though you have multiple redundant web servers, you still have a single point of failure in the DB server, and if it goes down, your system as a whole goes down. Hence, you still have the CAP theorem in place.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论