数据库架构,中央和/ vs本地化服务器 [英] Database Architecture, Central and/vs Localized Server

查看:138
本文介绍了数据库架构,中央和/ vs本地化服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个系统适用于有多个地点的公司。某些位置的不可靠的互联网速度/可用性导致在每个位置的本地服务器的路径,其中一个位置和中央服务器。



本地服务器对于每个位置都能够运行,无论它是否连接到外部世界,或者如果连接速度低于最佳,则消除高延迟。



中央服务器的作用有两个:


  1. 配置,策略,用户等管理。例如,在中央服务器上完成新产品,价格变化,促销,用户更改等,然后分发到本地服务器,以便他们获得最新的信息。

  2. 集中所有在每个位置创建的数据,以生成报告,分析和仓库数据。

有多少数据要保留在本地服务器是有争议的。例如,一些过程不仅依赖于一个位置,如客户忠诚度,因此必须将查询运行到中央服务器以检查用户活动并确定激励。另一方面,活跃的客户群应该在本地服务器数据的范围内。



我缺乏这些类型的分布式系统的经验。我的问题是我们应该使用什么数据库来促进这种类型的设置,希望将功能整合到自动工作,而不需要太多的代码来实现到中心服务器的数据同步。

解决方案

主从复制



一个服务器(主服务器)接受写入,并将更改复制到只读副本(从属)



特性




  • 异步

  • 读取可扩展性

  • 主节点是所有节点>




Master-Master



在此设置中,所有数据库服务器都接受read





特征




  • 同步(希望)

  • 读写可扩展性

  • 性能比主从更差

  • 无SPOF



Master-Master难以设置和维护。 ID冲突的可能性。



任何流行的数据库服务器这些天支持上述功能。


The system in question is for a company with multiple locations. Unreliable internet speeds/availability at some locations have led to the path of a local server at each location off of which a location and a central server.

The role of the local server is for each location to be able to run no matter if it is connected to the outside world or not, or to eliminate high latency if the the connection speed is less than optimal.

The role of the central server is two-fold:

  1. Configuration, policy, user, etc, management. For example, new products, price changes, promotions, user changes, etc, are done on the central server and then distributed to the local servers so they have the most up to date info.
  2. Centralize all data created at each location to run reports, analytics and warehouse data.

The question of how much data to keep on the local server is debatable. For example some processes are dependent upon not just that one location, like customer loyalty, so a query must be run to the central server to check user activity and determine incentives. On the other hand, active customer base should be within the scope of the local servers data.

I lack experience in these types of distributed systems. My question is what database should we use that will facilitate this type of setup, hopefully incorporating the functionality to work automatically without much coding needed to achieve the data syncs to/from central server.

解决方案

Master-Slave Replication:

In this type of replication one server (the master) accepts writes and will replicate the changes to read replicas(slaves)

Characteristics

  • Asynchronous
  • Read Scalability
  • Master is a point of failure for all the nodes (SPOF)

Master-Master:

In this setup all the database servers accepts read and writes and synchronize together.

Characteristics

  • Synchronous(hopefully)
  • Read and Write Scalability
  • Performance is worse than Master-Slave
  • No SPOF

Master-Master is harder to setup and maintain. Possibility of id collisions.

Any Popular Database Server these days supports the features above.

这篇关于数据库架构,中央和/ vs本地化服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆