For all of my AWS friends out there, what is the best way to host your web application?
For pretty much all of my projects so far, I've been using different sizes of t2 EC2 instances. This has been working fine, but I've been wondering if there are any better instance types I'm missing out on. Any input would be greatly appreciated!
You should consider to create a serverless app. As long as your willing to dive into a new architectural pattern there is no need to ever start an ec2 instance again - at least when you start new projects from scratch!
Check out https://jamstack.org/
If you get in a pinch, hit me up, and depending on what you're trying to do, I may have an automation script for it.
I don't understand the serverless hype or even the naming. It still runs on a server, having some specs, right? The only difference is that you don't choose yourself what the specs of those servers are and how the scaling is done.
Serverless deals with orchestrating managed services - this makes so many things easier, cheaper and more secure.
I agree that it's easier to setup if you have a simple use-case where the exact server configuration and performance does not matter.
As far as I know it's more expensive and less secure (you share a lot more resources with other customers than on a dedicated, or even a VPS server).
I think it depends on the use case - but I'm pretty sure in most cases it's cheaper an more secure, to deploy business logic as serverless.
Having your business logic in a Lambda function, exposing the logic to the UI via an API gateway, securing access via AWS cognito has a very low attack surface compared to deploying business logic to a JBoss server. You'll need to do some hardening, firewall configuration, fail-over, usermanagement, WAF etc
And regarding cost: you'll pay for JBoss 24/7 - if you need high availability you'll pay for multiple servers.
With lambda you only pay for the execution - there won't be much cases where serverless is more expensive than paying for servers 24/7
This is interesting! Do you have any examples of IndieHacker projects built with a serverless app model?
I there are a lot of serverless applications out there. I developed a few in my day job using the serverless.com framework (but they are not publicly available)
And of course the prototype of my current IH project is serverless: AWS Amplify (OSS framework) + react for the UI, Cognito + Goolge oauth as usermanagement, deployment of ui and all lambda functions via the amplify cli, hosting incl. DNS via AWS Amplify (the AWS Service).
To clarify things AWS Amplify is a Javascript framework with support for differen t UI frameworks and "AWS Amplify" is also an AWS service to deal with deployment and hosting.
My "backend" is already deployed to AWS but the UI is still running on localhost - I need to do some bugfixing an will then make everythin public available and maybe write an articel on how to use serverless for in IH SaaS project
All Laravel "Vapor" deployments are serverless. I would imagine lots of production sites on it although I'm not running any.
We have built consentry.org entirely on Cloudflare Workers, but not yet using the serverless.com framework. Definitely excited to dive into that in the coming weeks.
I can assure you, it's been 1000x less complex than AWS, scales infinitely, is automatically CDN'd, and costs $5/month. It's an absolute no-brainer in my opinion.
Depends on your needs, as a starting point, for light marketing sites, checkout static sites on aws amplify.
t3, because they’re faster and cheaper than t2. Other than that, there’s not enough information, it all depends on your workload, from CPU to memory and bandwidth.
I actually haven't used t3 yet since I've been sticking with t2 from the free tier. I just took a look at the specs on the site and I can't believe I'm still using t2. Will definitely give t3 a try - thanks for the rec!
EC2 instances are best for starting projects IMO.
Yeah it seems like they are more flexible. At the moment I'm hosting both my database and server on an EC2 but I am thinking of potentially migrating my database to RDS (after I do the math on the cost difference of course).
RDS is fairly expensive, unless you have the traffic to justify it. For small/hobby projects I would stick with the DB on the EC2 instance. You may save more money by using Linode, Vultr or Digital Ocean. AWS is great in the fact that there are lots of services, but is not the cheapest option.
Thanks for the tip. Will definitely take a look at the alternative options you suggested!
AWS credentials are never boring when weighing the pros and cons. As some argue, certificates aren't always the best way to gauge a person's ability.. It's still a priority for many individuals, however. There has been a 49 percent yearly increase in demand for AWS cloud credentials compared to those from other providers. Of fact, even the little contribution may make a big difference. As your career and financial prospects grow, earning an AWS certification may be beneficial. This is how things stand.
Visit: https://www.sevenmentor.com/amazon-web-services-training-institute-in-pune.php
Just the t3a series which will save you about 10% on the price. The only difference is they use AMD rather than Intel processors, should be totally fine I've seen no performance difference.
=D
Hi Justin,
I would recommend using AWS EC2, which is enables you to deploy containers on their infrastructure (https://aws.amazon.com/ecs/). With ECS you can deploy your containerised application either on:
I found ECS to provide a lot of flexibility without having to go all in on something more heavy-handed like kubernetes. For Dash (https://getdash.ai) we have all our code running in different containers deployed on ECS from our CI/CD pipeline (we use Circle-CI, which has nice "Orbs" to integrate AWS ECS into its workflow).
Let me know if you have any additional question.
I am +1 for a serverless architecture if you have the technical chops. It is much cheaper and much easier to maintain with no servers. One of my soon to be launched projects is built on a monolith main structure but has a bunch of serverless microservices outside of the main app as well, so it is possible to do a hybrid approach.
I am an AWS Certified Solutions Architect so am happy to help answer any questions you have.
Hi Jason,
Check out https://docs.amplify.aws/start you can create app very fast and you can take advantages from very useful technologies like Graphql, also if you need some AI integrations can be easy to use it.
i use rancher server to manage k8s cluster. then just deploy apps as containers and proxy traffic to them with nginx. you need more power you just click few buttons in rancher and it will expand your cluster
Just adding couple of things on what other said.
I have created a fun quiz as well on AWS at https://app.goexampro.com/?examId=864e91bb-f53a-4029-97f6-b00abbc89a7d_1587833332
The quiz is created primarily for our subscribers at https://helloclouders.com
To others:
If any one of you are working a serverless application and if product is LIVE, let me know and I can try to take a quick interview and publish to our subscribers.
(There are about 150 subscribers)
Controversial... But just use heroku ;)
I host my Web application on s3, the back end is ec2. This is ideal for my SPA and complex back end. Deploying/hosting on s3 behind cloudfront is pretty simple to set up.
At work, we used a t2.medium instance for our Node.js app server for a long time and recently switched to a t3a.large. While we were using a t2.medium instance, we were serving around half a million users. Our requirements increased and we decided to switch to a better instance type. If your application is a CPU intensive probably go with a compute optimized instance. But T type instance should be enough for most application server use cases. I wouldn't use them for a database though. Database servers are better installed on compute optimized with SSDs.
If it’s a standard 3-tier app with MySQL or Postgres I would try Uffizzi cloud. It’s in beta now but it automates everything to make your cloud environment secure and it has auto scaling. You can also get high availability out of the box. Full disclosure- I helped build it and am naturally biased.
T2 instances are fine. We have over a thousand users of our SaaS now, and we run a lot of secondary or background tasks on T2 servers without issue. As long as it is only short bursts of activity (e.g. sending emails in bulk a couple of times a day, or doing recalculation routines in quick bursts, which is all we use our T2 instances for), that will be fine.
You just have to watch out if a process becomes 'hung' or takes longer than normal sucking up 80%+ processor time. Then you will get a nice big bill from AWS because your CPU credits will have run out!
Our main app servers are run on M5 instances because we need the extra grunt to carry the load of thousands of web pages being served up per minute. We used to use M3 instances, but upgraded recently just so we have some headroom to spare during busy times.
This comment was deleted 6 years ago