Lurker News
I'm running a small business on AWS as a solo founder. It's just me. Yesterday I had a service interruption while I was in the London subway. Luckily, I was able to sign in to the AWS console and resolve the issue.

But it does (again) raise the question I'd rather not think about. What if something happens to me and there's another outage that I can't fix?
So - how do you make sure that your servers are up as a one person founder? Can I pay someone to monitor my AWS deploy and make sure it's healthy?

Comments (223) 94 threads

jmstfv11 replies#
I am a solo founder of a website monitoring SaaS [0]. Theoretically, my uptime should be higher than that of my customers'. Here are a few things that I found helpful in the course of running my business:

* Redundancy. If you process background jobs, have multiple workers listening on the same queues (preferably in different regions or availability zones). Run multiple web servers and put them behind a load balancer. If you use AWS RDS or Heroku Postgres, use Multi-AZ deployment. Be mindful of your costs though, because they can skyrocket fast.
* Minimize moving parts (e.g. databases, servers, etc..). If possible, separate your marketing site from your web app. Prefer static sites over dynamic ones.
* Don't deploy at least 2 hours before you go to sleep (or leave your desk). 2 hours is usually enough to spot botched deploys.
* Try to use managed services as much as possible. As a solo founder, you probably have better things to focus on. As I mentioned before, keep an eye on your costs.
* Write unit/integration/system tests. Have a good coverage, but don't beat yourself up for not having 100%.
* Monitor your infrastructure and set up alerts. Whenever my logs match a predefined regex pattern (e.g "fatal" OR "exception" OR "error"), I get notified immediately. To be sure that alerts reach you, route them to multiple channels (e.g. email, SMS, Slack, etc..). Obviously, I'm biased here.
I'm not gonna lie, these things make me anxious, even to this day (it used to be worse). I take my laptop everywhere I go and make sure that my phone is always charged.
[0] https://tryhexadecimal.com

tnolet1 reply#
This is is scary.

This is exactly how I run my (also monitoring) SaaS and it shows that the OP has learned how to minimize risk and prepare for the worst.
You are married to your mobile & laptop.
I also shows there is no free lunch: you need to invest in redundancy.

jmstfv2 replies#
From time to time I ponder about all the terrible things that could happen: what can go wrong will probably go wrong so it helps to be (kinda) prepared.
tnolet#
Yes, however you are extremely and acutely aware of this. Your business depends on it.

This is not a long term solution though. You need to add people and take a break at some stage.

o-__-o#
As a single owner (of also a monitoring SaaS) I am currently putting out a fire where my primary datacenter died. I have suffered data loss even with precautions I had in place, one server lost all filesystems which took out my git repos.

I have backups, I have clones. I've still been in partial outage for 4 days and will be fully up tomorrow when I literally drive my servers to a new DC. Surprisingly I have slept 8 hours every night and I'm not worried. I've been in contact with my customers and provided solutions to keep them alive. If they leave they're going to leave, nothing I can do. I am looking to make sure everything is built uniformly (the server that died was the last of an old build process) and invest in scaling to the cloud in a bit more efficient and orderly manner.

rurp1 reply#
This is a great post, thanks. On your last point, do you mind sharing what you use to monitor the logs and send out alerts?
jmstfv#
I send my logs to Papertrail and they have a feature that will notify you if your logs match a predefined pattern. Some of the patterns that I use:

* Account deletion (DELETE FROM \"accounts\")
* New successful sign up (INSERT INTO "accounts")
* New signup attempt (Started POST "/signup") [0]
* Fatal Exception Error ("fatal" OR "exception" OR "error")
* Warning ("warn")
I do share my costs and tools publicly, in case if you're interested: https://tryhexadecimal.com/costs
[0] I got hit by a botnet attack couple weeks ago, so I keep a tab on their activity (https://news.ycombinator.com/item?id=21327416)

krat0sprakhar1 reply#
Offtopic: Really love how clean and readable the website is! Great work!
apankrat1 reply#
Indeedly!

Very clean and simple, but not trivial or bare. Really good job, jmstfv.

vmurthy1 reply#
From this link [0], it appears that the site uses Netlify. I'd love for the OP to point us in the direction of the theme and/or setup details as I am fairly new to Netlify

[0]https://tryhexadecimal.com/costs

Continue this thread — 1 reply

randlet2 replies#
With regards to AWS RDS & EC2 multi-az deploys and cost...buy reserved instances! It is much cheaper if you can afford to pay up front for 1yr or 3 years at a time.
jmstfv#
I do consider that but I'm still early in this game. My AWS spending is $1.38/day on EC2 and $1.05/day on RDS, all covered by AWS credit: https://tryhexadecimal.com/costs
threeseed1 reply#
For EC2 you really should be using spot fleets and making sure your architecture can support instances coming and going.
randlet#
I need to keep exactly two instances running (in separate AZs) and will never need to scale up beyond that...is it still worth investigating spot fleets in this case?
daniel_iversen4 replies#
> Monitor your infrastructure and set up alerts [..] "fatal" OR "exception" OR "error"

I almost have the regex "fatal|invalid|unknown|error|except|critical|cannot" in muscle memory many years after having last had to type it - must have typed it thousands of times tailing and grepping logs :- )

xxpor#
watch out for someone writing [FATAL] in a form somewhere and it getting logged :)
cutler#
In Ruby:

    %w[fatal invalid unknown error except critical cannot].any? {|word| 'My critical error message'.include? word}
... may be better than a regex if it's just a list of literal strings. Javascript also has something similar.
dTal#
That's a smell. If you have to type a mouthful like that more than twice, put it in a script.
unoti#
Instead of having a Regex that searches for error|critical|except it’s a good thing to have a log level in your logging infrastructure, so that you can query for example log level=2 and get all the bad things.

It takes a bit to work this into the code and infrastructure everywhere but it’s worth it.

vmurthy#
I really wish you all the best jmstfv ! The website is obviously great but I love the fact that you have shared such great tips at https://tryhexadecimal.com/costs for solo founders/ small business owners.
lettergram#
This covered most of my thoughts (also a solo founder). I also have a fallback server running that is an entire duplicate app running on my local machine (in house PC). When an error occurs it fails over to my local machine.

At fail-over my local machine will also switch from the dev database to prod (connecting to the RDS instance). It'll only has read-only access to relevant data, but it'll keep the site 90% functional.
Is it perfect? Hell no. Pretty hacky, but it's kept my application running twice after a failure in the past two years.

no_wizard#
Honestly I’ve worked on teams with over 30 engineers that I wished abided by half this (particularly about the prefer static over dynamic bit This is just straight up good advice
cagmz1 reply#
Just curious; what do you use Redis for? Thanks for your post!
jmstfv1 reply#
Jobs (e.g. uptime checks, payment processing, sending emails) are added to the job queue (Redis) and background workers pick it up from there, and churn through them asynchronously. Most of the work happens in the background, so in my case, Redis is a critical piece of infrastructure.

https://devcenter.heroku.com/articles/background-jobs-queuei...

cagmz#
Ah, of course! I saw background jobs and Redis but didn't make the connection at the time.

Continue this thread — 2 more replies

apankrat7 replies#
> I was able to sign in to the AWS console and resolve the issue

Kids these days.
I had a RAM stick fry in one of the physical machines sitting in a colo 1 hour drive away. Not die, but just start flipping bits here and there, triggering most bizarre alerts you can imagine. On the night of December 24th. Now, that was fun.
--- To add ---
If you are a single founder - expect downtime and expect it to be stressful. Inhale, exhale, fix it, explain, apologize and then make changes to try and prevent it from happening again. Little by little, weak points will get fortified or eliminated and the risk of "incidents" will go down. There's no silver bullet, but with experience things become easier and less scary.

idlewords#
Effective apologizing is the #1 business skill of the one-person tech company.
type0#
Thank you for sharing, that's a real nightmare before Christmas story!
apankrat#
I hope you kept it ;)
quaquaqua1#
And for everyone else who doesn't feel like doing that, Amazon Lambda and a server in your closet are two other options.

If your workload doesn't fit into such a setup, then you simply need to take investment, optimize your code, or move closer to your colo

gspetr1 reply#
Isn't this exactly the case where you could have avoided this hassle entirely had you shelled out some cash for ECC memory?
taf2#
Live and learn is what I think the take away of this story is all about... I had a server fail dec 25 mid morning. It caused failures in away I had thought about before because instead appearing completely dead it was alive enough to not let go of any tcp connections. For the critical component in question, I didn’t have the correct timeouts in place... so as the single operator I was fortunate that my wife was also my co founder and so was a bit more understanding.
quickthrower2#
Kids these days.

Insert punchcard anecdote...
Transistors! We had to replace valves in my day.

thorwasdfasdf#
geez... why do these things always need to happen right around the holidays. I mean the disaster couldn't wait a week or two later?
jgimenez#
Reminds me of an int32 <> int64 mismatch that overflowed precisely also on the night of Dec 24th!
__d1 reply#
You might also want to consider some additional risks that are often overlooked:

Billing issues. What happens if the credit card you use to pay for everything gets hijacked, and you're trapped with a blocked card trying to clean it up but your bank is taking their sweet time and won't give you another card until it's sorted? ALWAYS have a backup credit card.
DNS Registrar. There's a hard SPOF in the DNS, where your registrar essentially holds your domain name hostage. If your DNS gets hijacked, but your registrar is taking a few days to sort out who actually owns it, you're down hard. There's no mitigation for this one, except paying for a registrar with proper security processes. If you do 3FA anywhere, make it here.
AppStore. If your app gets banned, or a critical update blocked, what do you do? Building in a fallback URL (using a different domain name, with a different registrar, can help work around any backend issues. There's not much you can do for the frontend functionality, except using a webapp.
It can be worthwhile looking at risks and possible mitigations beyond just server and database issues, especially when it's just you.

randlet1 reply#
> What happens if the credit card you use to pay for everything gets hijacked, and you're trapped with a blocked card trying to clean it up but your bank is taking their sweet time and won't give you another card until it's sorted?

This happened to me this week. Luckily bank got me the new card within 2 business days, but still was a bit stressful and I burned a day getting my payment info updated everywhere.

type0#
> What happens if the credit card you use to pay for everything gets hijacked, and you're trapped with a blocked card trying to clean it up but your bank is taking their sweet time and won't give you another card until it's sorted?

It doesn't even have to get hijacked, we had our bank reissuing cards because of some bug on the old chip, the card number stayed the same and the expiration dates changed but Google Cloud blocked the paying accounts. Security is the top priority sure, but I don't want some proprietary algorithms decide whether or not our server will be up or not. The fix was to move away from Google, because bouncing on their support took to long.

thrownaway9543 replies#
I know this is going to be down-voted to nonexistence since everyone now-a-days wants to serverless, AWS and what not. personally i've always used either hosting.com or inmotionhosting.com. yes they are more expensive than AWS and what not, but the thing is, they both have a support staff 24/7/365. I called whenever i need and have someone remote into my server and fix whatever is wrong. furthermore, i can even have the server alert emails routed to not only me, but them as well! so they know about the problem and are on it and i don't have to do a thing.

Continue this thread — 3 replies

Load more comments