8 ms·
Nice post, and interesting to see your learning pretty much matches my own when building my SaaS business. Curious as to why you didn't opt for RDS for the dat
by cyberferret 9y ago
Nice post, and interesting to see your learning pretty much matches my own when building my SaaS business.
Curious as to why you didn't opt for RDS for the database side of things? I actually have about 5 side projects as well as my main SaaS, and they all share the same RDS instance for the database which saves me cost while keeping performance high.
Also, do you use Lambda much at all for periodic scripts that need to run? I've more recently been building more and more mini applets on Lambda for things like health checks or replicating data across Amazon services etc. with good results.
Also, and this might be a good complimentary service to your monitoring service, but I've been using CloudWatch's timed tasks a lot recently to trigger some of those Lambda instances - very quick and easy. I've been using another service to monitor and report on missed triggers, but will look into Cronitor a bit more as a viable option.
- paulddraper 9y agoFailover time for RDS is high, like a minute or two. That's probably fine for lots of stuff, but not everything.
- mrep 9y agoHow do you get higher availability than that?
- paulddraper 9y agoUse Virtual IP rather than DNS for failover. Minutes is a really long time to go down.
- mrep 9y agoHave you tested that? If you actually have an in-house solution to providing better availability than amazon's RDS options, then I recommend you market your engineering solution to the major cloud providers as they will pay you very well to help them implement your solution to that problem.
- paulddraper 9y ago> Have you tested that? Only all the time. > I recommend you market your engineering solution I saw exactly that company at the last re:Invent. Can't remember what the name was... > to the major cloud providers as they will pay you very well to help them implement your solution to that problem. My guess is that most reasonably sized organization manager their own databases for uptime-critical systems (case in point). It lets them have more control over backups, when to upgrade the database, how to handle failover, etc.
- wahnfrieden 9y agoTake a look at Aurora - around ten seconds.
- paulddraper 9y agoIf you use MariaDB drivers.
- mwcampbell 9y agoCan you link to more info on this? Do you mean using libmariadb, or some other driver (like a JDBC one)? What's the advantage over MySQL's libmysqlclient?
- paulddraper 9y agoIIRC, MariaDB has a table with the IP address of the master, and the MariaDB drivers (not sure which ones exactly) can check that table. That's the only way you can get a 10s failover.
- mwcampbell 9y agoWhy is that the only way to get a 10s failover? The TTL on the DNS records for Amazon RDS, at least for Aurora, is just 5s.
- paulddraper 9y agoI think because route53 is slow to update? I don't know. I do know that AWS itself documents 60-120s for RDS. http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.MultiAZ.html http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concep...
- deleted 9y ago[deleted]
- lostcolony 9y agoIf your use case fits S3 (eventually consistent updates are okay, no complex query model), you should almost always prefer it to RDS. S3 is usually cheaper than RDS (lots of updates may negate this, but storage costs and then usage based billing = most cases are cheaper. If your DB load is so low that you can reuse it between projects, and your query model is sufficiently simple that S3 could serve it up, you might try running some numbers). It also scales transparently, and infinitely. RDS requires downtime to scale horizontally, and goes only so far. The general suggestion, from AWS themselves, is to try and fit things into S3 first, and only go for RDS (or DynamoDB) if it makes sense to. Barring a clear indicator, S3 will almost always be cheaper, and has no scaling concerns. That's also been our experience; defaulting to S3 has been the cheapest, and required the least maintenance from us, and only when we come up with a good reason (need for complex or high performance queries, generally) did it ever make sense for us to reach for RDS or DynamoDB.
- meritt 9y agoThey are running MySQL on an m4.xlarge server. He's asking why they aren't using RDS instead. What does S3 have to do with his question?
- lostcolony 9y agoI also saw they were using S3; I thought that was what the OP question was in relation to.
- hamandcheese 9y agoIs this satire? There is so much utility in having a (relational) database that comparing it to S3, on the pretense cost savings, is ludicrous.
- lostcolony 9y ago-If you benefit from it-. Utility only matters if you're using it; otherwise, why pay for it?