I am reasonably familiar with AWS, I use a stack of ASP.NET MVC and MySQL, as well as Redis for caching/messaging.
Normally to keep a count of something, I would use a MySQL table to keep a count of something, for an action on my website. I can easily execute the following from within my code:
UPDATE mycounts SET mycount = mycount + 1 WHERE id = @countId
I can guarantee that this is executed ATOMIC-ally, so I can pretty much guarantee that if the table is up that the count will go up by exactly one for each call.
My problem with this implementation is that:
- It requires a database instance, this is expensive
- It requires the database to be up at all times, any down time and I'm going to lose counts
What is the cheapest way to keep a count of something on the AWS platform, without having to have an RDS database? That is both fault tolerant and accurate...