Reputation: 3437
We want to have a updated properties file with version information locally on our backend application:
..so, on every request from our clients, we can check if the user has the newest version, or if the application is in maintenance mode, without making any additional database calls.
First idea was to get the local properties file updated through a manual endpoint call on the backend - that's working fine, for one instance. But what if we deploy it on AWS using Elastic Beanstalk, the endpoint call will just update the properties file on one of the instances. How can we manage a local property file on different instances without producing big overheads? Any ideas?
Upvotes: 0
Views: 64
Reputation: 17535
One way would be to store the file in S3. You could then read the file every time it is needed and all servers would share the same copy. However, if this is a frequently updated and/or read file I would use an SNS notification and local cache for the file. Basically, on startup all servers would read the file from S3 and store a local cached copy. Then they would listen on an SNS topic that is hooked up to the S3 bucket. On update of the bucket will send an SNS notification to everything that is listening. The servers would re-read the file and update the local copy.
Upvotes: 2