I am currently working on an application that is dealing with frontmatter markdown files 99% of the time (some things have to communicate with a DB like RDS).
Locally, I have a folder that stores all the users data like this:
- user_1
- project_A
- file1.md
- file2.md
- project_B
- user_2
- project A
Each project is its own git repository in order to track changes between files and to provide a change history for the user (Commits are auto-generated through using the application).
I have mostly worked with AWS-Lambda based stacks in the past, and while Lambda supports EFS, from what I can research, it doesn't seem to be suited for working with git-repos.
Instead, the recommended solution seems to be to have an EC2 Instance with an attached EBS, but I am wondering about a few things (as I have never used that kind of setup before):
- Concurrency: Given, that the Server (Node Fastify in this case) itself can handle many concurrent requests, how well can the file system handle concurrent git operations on many projects all at once?
- Graceful deployments: Does a ECS instance via Fargate get all the proper shutdown commands so the process can finish writing the commits in time, or could some repositories get corrupted during a deployment?
- Scalability: How much FILE throughput can a small ECS instance handle before it becomes to much? Does adding a second ECS instance affect the file access (what about two instances trying to write to the same repo)?
Are there any other caveats or things I have missed? Are there any alternatives to using a git repo at all (I do have to support multi-device editing with offline sync support, so using git under the hood was the most straight forward solution to me).
Many thanks in advance!