Score:0

Real-time push config to an application on AWS

tr flag
Max

I have several EC2 instances running an application that I need to push config to in real-time. Each instance of the application needs to be able to get the most recent config when it comes up, and receive new configs with <500ms latency. Configs are only ~1kb. The servers running the application span multiple regions.

I've previously used Apache Zookeeper for this purpose, but I was wondering if there was a way to use a managed solution? The first thing that comes to mind is a hosted Amazon RDS PostgreSQL server with NOTIFY/LISTEN but that seems overkill?

Tim avatar
gp flag
Tim
Can you please expand your question to give more context. What are you configuring? Your EC2 instance?? Is EC2 acting as a file server for some kind of remote client? Something else? It's difficult to answer with the limited information you've given us. If you are just sending files to a remote device can you just upload to S3 and have it downloaded from there? S3 announced strong "read after write" consistency about a year ago https://aws.amazon.com/blogs/aws/amazon-s3-update-strong-read-after-write-consistency/
tr flag
Max
Thanks @Tim! Have clarified. It's just an application running on the EC2 instances that needs the up-to-date config. And S3 would be fine, if we had a way to subscribe to a bucket with <500ms latency? Are there other options? PostgreSQL NOTIFY/LISTEN would probably be lower latency?
Tim avatar
gp flag
Tim
SNS latency is under 100ms. You might be able to push the config through SNS, or push a notification on SNS to be pulled from S3. You'll have to test to see if can happen under 500ms, that's an unusually tight timeframe. I wonder if re-architecting in some way could reduce the need for such a tight timeframe. https://betterdev.blog/aws-messaging-services-sqs-sns-kinesis-eventbridge/
cn flag
Could also look at pushing the config via an SQS queue?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.