Search code examples
amazon-web-servicesinitializationconfiguration-files

Where to store init attributes in a distributed WebApp?


I'm developing a webapp using JavaEE + Tomcat + MariaDB and I used to store some init configuration in a config.properties file. I read the attributes at the startup and store them into a HashMap.

I'm thinking about using Amazon Web Services, so my code will be distributed into several servers, so my question is...

Would it be ok keeping the config.properties file or it would be better to store all the configuration attributes in a database?


PS: The config file is composed by key and value, as follows:

popular_factor=0.05
login_minlength=3
...

But could be found very long strings.

Thanks!


Solution

  • I have been reading a lot of doumentation and I found the solution.

    I should store that files in a S3 bucket and link it from the EC2 instance using S3FS. If I use a load balancer (several instances running) that code would be unique and be read by the instances.