简体   繁体   中英

Is Amazon EC2 free tier server appropriate for my little web application?

I'm building a little software activation web service in Java, so I need a cloud-based server which will run Apache and Tomcat and MySQL.

It will get very little usage as I don't expect to sell very much product at first. I'll be very lucky if the server handles one quick activation a day... if it got 20 in a day that would be an amazing success.

I'm looking at Amazon EC2 pricing here...

https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc

I see that there is a "Free Tier" which provides "750 hours per month of Linux t2.micro or t3.micro instance". And it's free for year.

STUPID QUESTION #1: 24h/day x 31 days/month is 744 hours... so, does that mean I'm getting a free linux server running 24/7 for a year or is there a catch that I'm missing?

STUPID QUESTION #2: t2.micro/t2.micro has 1 vCPU, 1GB Memory... is that enough power to run a simple Apache + Tomcat + MySQL web service reliably?

STUPID QUESTION #3: Any reason why I should skip the free tier and invest in a powerful pay $$$ option?

  1. Yes. No catch. It's just not a very strong server.
  2. That really depends on what that service does. Performance wise you need to pay attention to t2 instances being optimized for burst operations. That means they run full speed for a little while and then get throttled. But if you're talking about reliability, it's a whole other story. Just one machine is usually not enough for that. You want multiple machines in multiple data centers. What if one machine goes down? What if the whole data center goes down? It really depends on just how reliable you want it.
  3. That really depends on what you're looking for. If you don't know yet, stick to free until you figure it out. I would even go for something simpler like Heroku at first. At least you won't have to take care of the reliability aspect as much.

You describe your service as: "Accept an encrypted license key, decrypt it, verify it, return and encrypted boolean response" .

This sounds like an excellent candidate for a serverless solution :

  • AWS API Gateway providing an HTTPS endpoint that the application can call
  • It then triggers an AWS Lambda function that performs the logic and exits

However, you also mention a MySQL database. This could be provided by Amazon RDS. Or, you could go serverless and use DynamoDB (a NoSQL database).

The benefit of a serverless architecture is that it can scale to handle high loads and doesn't cost you anything (except potentially for the database) when not being used.

There is a free tier available for AWS API Gateway, AWS Lambda, Amazon DynamoDB and Amazon RDS.

There might be a limitation on network traffic for EC2 instances. You should look into that before deciding to host a web service on it. There is even a possibility it could charge you for using too much network bandwidth, so scalability might be an issue. I suggest you try Heroku instead, and then switch to other app hosting services when if and when you need to scale.

Yes, i have developed an low to medium web application as mysql backend.But, please be sure about number of users, as it depends on the performance and scalability.

If you are looking for very little usage EC2 is the best matching free tire which provides by the AWS. The EC2 Micro instances to keep under the AWS Free Tier, which covers 750 hours of t2. micro instances. And the servers are available Linux as well as windows

When we talking about the second question it depends on your application type. As per the question that you asked 8GB is enough to run your apache and SQL. But when it comes to reliability , it's a different story. In most cases, one machine is insufficient. You'd like to have multiple machines in different data centers. So, in that case, it is better to move to another service.

When we talking about your 3rd question, it also depends on the applicability of your application. If your application having a high number of users and many concurrent processes and if you need to improve the reliability, it is good to move to pay subscriptions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM