Scaling Questions Pt: 1

How would you handle a server crash?

Restart the server.

You restarted the server due a crash, but your db is empty now. How do you handle this in the future?

You routinely backup your db to a cloud service like AWS S3.

You have your backup db. But users are getting 404 errors. What do you do?

We know that its a 404 so the application went down → simple immediate fix is to restart the application on the server.

After some time your app produces 500 errors. What do you do?

Check the logs to see where the error is → errors indicate the database connection pool has been saturated.

The database connection pool has been saturated. What is the database connection pool? Why is it saturated? How do you fix this?

Connection pooling: a strategy to keep the database connections open and reused because connecting to a db can be an expensive task.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store