简体   繁体   中英

Shared Database between 2 application instances in different servers

Let me share our current setup first.

We have an application that runs on 2 servers (server A and B), and the purpose of having this is for load balancing purposes. The application version on both A and B are exactly the same and there is a shared database between 2 instances.

We are currently encountering an issue wherein it seems that stored values of variables are being shared between the two instances as well which is not what we expected.

For example, there is one configuration file in server A and another in server B. There are instances wherein the contents are different. What we have found is that sometimes when accessing the application in server A and then reading the configuration file, we are also getting values that are contained in the configuration file in server B.

Has anyone encountered a similar issue as we have? And any tips on how to get around this issue?

Regards,

Philip

You can use etcd service, share your configuration between any number of instances you want

etcd is a distributed, consistent key-value store for shared configuration and > service discovery, with a focus on being:
- Simple: curl'able user-facing API (HTTP+JSON)
- Secure: optional SSL client cert authentication
- Fast: benchmarked 1000s of writes/s per instance
- Reliable: properly distributed using Raft

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM