-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
微服务多节点部署时,一致性无法保证! #78
Comments
我们重写了ribbon的机制,让其在同一次事务下请求同一个模块 |
这是在哪个版本中重写的机制,去年的版本中已经有了么? |
@1991wangliang 怎么重写的ribbon啊, 能贴出来 代码吗? |
你在lcn的SpringCloud的包下看一下 |
dubbo 的也有吧 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
----------案例---------- 场景: 一个微服务A , 部署了两个节点 A1 和 A2 ,当我的事务组发起方是 B 时,在同一业务中,多次调用到A服务的数据。 问题: 多次调用A时,发现,有可能到A1 有可能到A2,同一分布式事务中,如果通过A1插入了数据(假提交),又调用A2来获取---会获取不到
我建议的解决方案: 因为单节点时,在LCN中,还保持着同一个datasource连接,就和本地一样,可以保证一致性;只是如果多节点,在不同的应用上,就不可能是同一连接了。 所以,如果一个分布式事务业务流程在一个线程中,能保证多次调用一直是 A1 或 A2 就没问题。 (要能保证同一线程中,调用的节点不要乱跑就很好了)
The text was updated successfully, but these errors were encountered: