Source: APPICS website
About a month ago, I came across one of @exyle's appics posts and found out he was using it on an iPhone. I knew the appics app was out for Android but didn't know there was an app available on TestFlight. I was pretty keen to try it out because I get FOMO pretty easily, and there was no way I was moving back to a non Apple device 😂
I decided to create an alt account for appics so as to not clutter my main account. The app works pretty well, but as it's quite new (compared to say Instagram). There's not much content on there that I'm interested in yet. Regardless, I will keep posting and curating so my little image portfolio grows over time.
As I'm a bit of techie, I noticed that appics is serving their images from Amazon S3. I think using object based storage in S3 is fantastic because of its 99.999999999% durability over a given year. Also, you don't have to worry about maintaining a server to host the files, patch it, keep an eye on the disk space et al. The only thing you have to concern yourself is uploading the files! To serve files from the bucket, all you have to do is enable Static website hosting in the bucket properties. Here's an example of a said bucket I host for @ausbitbank's landing page:
You'll also have to ensure that the objects are set to public read:
Then you can access it via an S3 url like one of my appics images:
That's all pretty easy right? Correct, but you must be aware of S3 pricing (although scalability is not an issue). Let's keep the numbers really simple and say appics is using 1TB of data stored in S3. This costs ~$24.10 per month in the us-east-1 region. Let's also guess that the outbound data transfer to the internet is about 1TB per month—this costs $92.07.
So it's about $114.77 USD per month just for serving image files (not including any other resources they use like web servers). This number will only get larger as they grow. I would suggest the following:
- Leverage the AWS CloudFront service.
Simply create a new CloudFront distribution and set the bucket as the origin. Not only is this an instant performance boost for users around the world, it's also significantly cheaper to serve files. Of course, this would require some sort of database update because the urls will change. In any case, this small change drastically reduces costs already:
- Use S3 lifecycle policies
What is the lifespan of an appics image? 7 days (just like the Steem payout window?). How often will someone view an appics image back from 3 months ago? These are all hard questions to answer but one could make some educated guesses. S3 has the ability to store objects in different tiers which reflect different prices. @appics could simply try one of the following lifecycle policies (without any change to underlying code):
Transition to S3 Infrequent access after 30 days
Transition to S3 Intelligent tiering after 30 days
S3 Standard-IA is the same as normal S3 storage class but you pay a little extra to retrieve the object. So it's good for images that need fast access when requested, but not necessarily accessed frequently.
S3 Intelligent-Tiering is a magic tier that determines the storage class automatically based on usage patterns. It's a relatively new offering from AWS and they charge a monitoring fee for each object. Still, it's going to save money if you are storing a large amount of data with unpredictable access patterns.
So there we have it...a brief rundown on cost savings in AWS S3. Without knowing what other AWS services they use, there's could be also more to money to save!