Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS ECS setup #239

Open
code-bunny opened this issue Nov 26, 2024 · 2 comments
Open

AWS ECS setup #239

code-bunny opened this issue Nov 26, 2024 · 2 comments

Comments

@code-bunny
Copy link

I am a little confused about the setup process. It seems you are recommending SQLite3 for the cache which make sense as it means less 'real' databases to maintain.

On a AWS ECS cluster with the service running on two instances of a task would we want to give each instance of the application its own SQLite3 database with a cache with a docker volume. Or do we want to setup a EFS so the tasks can share the cache with some sort of alteration to SQLite3 to stop it from blocking the second process and therefore keep the cache alive between deploys?

Or in this setup do we stick with RDS Postgres?

@djmb
Copy link
Collaborator

djmb commented Dec 23, 2024

Hey @code-bunny!

It depends on your cache access patterns but I'd expect if you have multiple instances of your app, its going to be more effective to have a Postgres database for the cache that is shared between them.

You can use the same database as the rest of your app or a different one - again the best choice would depend on you app.

I'd expect that sharing a SQLite cache via EFS might not work well with the extra latency for reads and writes.

@code-bunny
Copy link
Author

Hi @djmb, Thanks for clarifying. That make sense, I was just a wee bit confused with all the mentions of using SQLite.

I did experiment a wee bit with SQLite3 on EFS and EBS. The main issue on both cases was that if you scaled your app to multiple instances, one instance couldn't write to the database. So it seems SQLite3's main use in prod just now would be for a small that that isn't scaled across multiple servers, and it lacks support for UUID out the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants