Score:0

What AWS architecture would be mosted suited for a SaaS that uses uses git repositories as data storage?

in flag

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!

Tim avatar
gp flag
Tim
Your question isn't especially clear. Your question "EC2 via Fargate" - I'm not sure what you mean by this, Fargate runs serverless containers such as ECS not EC2. If you're looking for git repositories have you considered AWS CodeCommit?
spaceemotion avatar
in flag
Sorry for confusing the terms, I meant ECS with Fargate, as I would like to dockerize my application for easier deployments. Seems like ECS also supports attaching EBS? The reason for not wanting to use CodeCommit is that the repos aren't holding any code at all, but rather simple markdown content (like for a CMS).
Tim avatar
gp flag
Tim
You can put anything you like in CodeCommit, code, markdown, media, etc, and it's incredibly cheap. It seems like you're going out of your way to use a server / container when the managed service is virtually free at scale and very simple to use. To my mind you haven't described a use case where it makes sense to be self hosted.
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.