3 ms·
How do you push the files to all of your containers? I’ve done this in the past with app specific endpoints but never found a solution I liked with containers.
by maccard 2y ago
How do you push the files to all of your containers? I’ve done this in the past with app specific endpoints but never found a solution I liked with containers.
- superb_dev 2y agoWe keep a JSON blob in Google Secret Manager for our flags. The service running in the container will reload the secret anytime it changes
- maccard 2y agoAh that’s a super nice feature. I’m mostly familiar with AWS who don’t have a neat way of doing this, you end up with a bespoke solution either with lambdas pushing to shared volumes or just polling s3 for updates.
- withinboredom 2y agoIf you are using kubernetes, you can mount the secret/ConfigMap as a volume and it will be updated automatically when changes occur. Then your application merely watches the file for updates.
- maccard 2y agoBeing on AWS, using EKS feels like overkill when you're talking $75/month just for having it managed by AWS. This doesn't work with ECS, unfortunately, or if you're just running docker on EC2.
- moltar 2y agoAWS has a native service for this called AppConfig and has agents that can pull and cache flag values so your services only need to make localhost requests.
- maccard 2y agoAH nice, I was not aware of this. Thanks (It is expensive, though...)
- moltar 2y agoExpensive?? Really? One of the cheapest services around. $0.0000002 per configuration request
- maccard 2y agoDepending on when you’re evaluating it’s a per request overhead. You might/provably have multiple flags per request. Compared to a lambda invocation that pushes a config file to every container if it changes, it’s expensive.
- the_mitsuhiko 2y agoWe currently persist the feature flag config in a database where the containers pull it from. Not the optimal solution but that was a natural evolution from a system we already had in place.