HNHacker News
TopNewBestAskShowJobs

root993

87 karma · joined June 27, 2020

Full stack developer and first time entrepreneur currently building superlemon.xyz
submissionscomments
root993··on The Set data structure saved me from a world of pain
For a very large database where the count would be filtered based on status of the conversations and running this query for every single support channel would be expensive would it not?
root993··on The Set data structure saved me from a world of pain
Yup, this is exactly why I went a Set. The fact that it can't contain duplicates is super handy
root993··on Hosting your entire web application using S3 and CloudFront
We use twilio.com for the WhatsApp API
root993··on Hosting your entire web application using S3 and CloudFront
Yes but each order has a unique ID which only the customer who placed that order will have access to. If that customer decides to share that URL on his own discretion that is fine by us
root993··on Hosting your entire web application using S3 and CloudFront
Hello, Author here.

Could you elaborate on what part of the maintenance would be messy? I was under the impression that maintaining this would be quite easy because there is no physical server present anywhere in this setup.

root993··on Hosting your entire web application using S3 and CloudFront
Hello, author here.

My bad for not giving a more appropriate title for the post. You re right this setup does not take the backend APIs into account. In our case we use Lambda for the backend APIs so that is also serverless but I failed to mention it in the post.

root993··on Hosting your entire web application using S3 and CloudFront
Hello, author here.

Thanks for the information. I guess we never encountered this because our application is in react js framework, so once the build is done it creates just one index.html file and there are no subdirectories.

But this is duly noted

root993··on Hosting your entire web application using S3 and CloudFront
Ah, I see but hosting the site behind a CDN is imperative in our case so this would not work
root993··on Hosting your entire web application using S3 and CloudFront
Not exactly sure what you mean by shared hosting. Could you elaborate? Also would this be hosted behind a CDN?
root993··on Hosting your entire web application using S3 and CloudFront
Happy to help :)
root993··on How we got our AWS bill to around 2% of revenue
Hello, author here.

Like I mentioned in the post, there is no way to programmatically upload anything to the Shopify CDN and the CDN cache cannot be invalidated once you upload a file. If you want to update an existing resource, all you can do really is upload a new one.

This ofcourse still does not completely prevent people from abusing it, but it does restrict usage to a large extent. There is also the issue of giving out a cdn.shopify.com link to your customers instead of something that has you company branding on it. This is not a problem for us because our customers do not have to manually add this snippet to their website and we do it via an API instead, so this link is not apparent to our customers

root993··on How we got our AWS bill to around 2% of revenue
Hello, author here.

I totally agree on Lambda first. The only reason we did not do that is because when we started this product I was not well versed with Lambda and serverless and preferred to work with something that I dealt with previously.

If I could go back in time, I would set up all our applications on serverless.

root993··on How we got our AWS bill to around 2% of revenue
I hate to admit it but the nginx server infact is a SPOF.

We currently handle it by setting up alerts all over the place so I can take quick action if something goes sideways, but other than this I have not really found a way around it.

We also have latest snapshots ready of all our instances so that I can get another server running ASAP during a calamity.

root993··on How we got our AWS bill to around 2% of revenue
There is one book that I would highly recommend - https://gumroad.com/l/aws-good-parts
root993··on How we got our AWS bill to around 2% of revenue
Hello, author here. I just want to confirm that this is one of the reasons why we did not go with Lambda and the other reason being I was not fully aware of and versed with serverless when we started this venture
root993··on How we got our AWS bill to around 2% of revenue
Hello, Author here.

While this is true, we wanted to go with AWS for 2 primary reasons

1. We use some of the other services provided by AWS like s3 and Route53.

2. Just the reliability and brand that AWS has is something that we had to take into consideration

root993··on How we got our AWS bill to around 2% of revenue
Hello, author here.

We definitely considered using other cloud providers like DO, linode, etc. But it was important for us to go with AWS because we needed some of the other services that AWS providers like s3, Route53, etc.

Some of our static websites are in fact hosted entirely using CloudFront + s3 combination which is something I forgot to mention in this post :)

root993··on How we got our AWS bill to around 2% of revenue
Hello, author here.

1. When I started working on this I was not fully aware of the large array of services that AWS provides and therefore our setup may not be the best possible one. So I would be checking out Elastic beanstalk for sure and see if it is feasible to use for my next venture.

2. Just to clarify, we are not running mysql on a lightsail instance, rather we are using a managed database provided by lightsail which automatically takes backups on its own and also has the option to restore a new DB from an existing backup.

3. Thanks for the insight on EB. Will be looking into it for sure.

The thought of any of these instances going down scares me as well. but I would like to believe that I have set up enough alerts everywhere so I can take immediate action :)