如何路由到最近的 RMI 服务器?
继续我的问题如何提高客户端的性能服务器架构应用程序
我决定维护一个集中式数据库和几个从属服务器数据库配置。 我计划使用 Symmetric DS 在从属数据库和主数据库之间进行复制。 每个服务器数据库配置都将安装在更靠近客户端的位置。 理想情况下,出于显而易见的原因,我希望来自客户端的请求路由到最近的从服务器数据库。 由于我使用 RMI 连接到服务器,我想知道当前是否有任何可用的产品/API 可以解决这个问题?
除上述解决方案之外的任何其他解决方案都受到高度重视:)
注意:重构客户端代码绝对是一种选择,但由于应用程序非常庞大,因此风险巨大(可能会破坏现有代码)、耗时且耗时。 昂贵的。
In continuation to my question How to improve the performance of client server architecture application
I have decided to maintain a centralized database and several slave server-database configuration. I plan to use Symmetric DS for replicating between the slave and master database. Each server-database configuration would be installed closer to the client. Ideally I want the request from a client to route to the nearest slave server-database for the obvious reason. Since I'm using RMI to connect to the server, I want to know if there is any product/API currently available, which would solve this?
Any other solution than the above one is highly regarded :)
Note: Refactoring the client code is definitely one alternative but since the application is very huge, its a huge risk (can break existing code), time taking & expensive.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看一下分布式和一致性哈希:
http://en.wikipedia.org/wiki/Distributed_hash_table #Keyspace_partitioning
http://en.wikipedia.org/wiki/Consistent_hashing
准系统,您可以设置一个变体一致的散列将采用客户端的标识符(代替“密钥”)并找到最近的服务器。 这里的额外好处是,如果其中一个从服务器出现故障,您的基础设施将透明地路由到下一个最近的服务器。
Take a look at distributed and consistent hashing:
http://en.wikipedia.org/wiki/Distributed_hash_table#Keyspace_partitioning
http://en.wikipedia.org/wiki/Consistent_hashing
Barebones, you would setup a variant of consistent hashing that would take the identifier of the client (in lieu of the 'key') and locate the nearest server. Bonus benefit here is that if one of the slaves goes down, your infrastructure will transparently route to the next nearest server.