Skip to content

Serverless: How I Sleep at Night

Posted in Technology, Business

Can I rely on Coalesce if you're the only person behind it? What if it goes down and you're busy or asleep?

That's probably the biggest question I get as the only person behind Coalesce. It's a rational question; if I were to put important data in someone else's system, I would also want to be sure it will be available when I need it.

Coalesce, like almost every other web app in existence, keeps your data "server-side" for a variety of reasons (security and availability on multiple devices are big ones). The fact that the data isn't stored on your computer, though, means that you rely on the Coalesce servers to access your data. Most large companies have entire teams dedicated to ensuring that the company servers stay up and running to guarantee availability for their customers.

I'm a one person company, so how do I ensure availability to you? Serverless technology.

What do I mean by "Serverless"?

Confusingly, "serverless" doesn't mean that there aren't servers to maintain. It only means that it's someone else's job to maintain those servers.

Instead of running on servers, which require maintenance and care to keep running, Coalesce runs on commercial services that provide pieces of functionality at a higher level of abstraction. The services themselves run on servers, but I don't have to worry about them. Each service has it's own team of engineers working to maintain the service, and I just pay for the amount of usage that Coalesce needs.

What services does Coalesce use?

The Coalesce app runs entirely on Amazon Web Services (AWS). The benefit of keeping everything on AWS is that the services integrate well with each other and there is very little latency when the services need to interact.

  • Cloudfront
    • Cloudfront is AWS's "content distribution network" as a service. This allows me to serve to customers as quickly as possible, and also handles Transport Layer Security (TLS).
    • SLA: 99.9% monthly uptime
  • Simple Storage Service (S3)
    • All of the web app code that runs in your browser is kept in an S3 "bucket". This service just holds those files so that Cloudfront can serve them worldwide.
    • SLA: 99.9% monthly uptime
  • Cognito User Pools
    • Cognito holds account information like usernames and password hashes, and is also responsible for the sign in, sign up, and forgot password features of Coalesce.
    • SLA: 99.9% monthly uptime
  • DynamoDB
    • While the user account data is in Cognito, all other data is in DynamoDB. It is an encrypted and scalable database to ensure your data is secure and available.
    • SLA: 99.99% monthly uptime
  • API Gateway Websockets
    • As you use Coalesce, it needs to keep up with the latest data in DynamoDB and keep in sync with your team members who may be changing things in their own Coalesce tab. This is facilitated by the websockets service provided by API Gateway.
    • SLA: 99.95% monthly uptime
  • Lambda
    • This is the most complex service Coalesce uses. Lambda allows me to write custom code that runs after events I can specify. I mostly use these for processing the messages that Coalesce sends via the API Gateway websockets.
    • SLA: 99.95% monthly uptime

Given the SLA uptime percentages I've cited for each service above, we can all be pretty confident that the services Coalesce relies on will be available when we need them. They're certainly much better uptime guarantees than I could give if I were maintaining servers myself. These guarantees are what allow me to sleep peacefully at night, knowing that Coalesce will be okay until I wake up.

So AWS has it covered then?

In large part, yes! Amazon pays lots of engineers lots of money to keep all these services up and running. That doesn't mean I don't have any responsibility though.

There is still plenty of custom software in Coalesce that I'm responsible for. In particular, I noted above that S3 just holds the web app code that I write, and Lambda runs custom code that I write. It's possible for me to write bad-enough code to make Coalesce unusable. Code that bad, however, is extremely unlikely to get through my multi-stage deployment/quality assurance process.

Like in any other piece of software, small bugs may make it through, so if you run into any, please let me know at!