My knowledge regarding servers is limited and I'm trying to figure learn more. I'm currently looking into EC2 and I have a question regarding their 'hours of runtime' for a single instance.
Say I go with an m1.medium instance which is $0.120 per hour. Is there any kind of underlying meaning to that? Or is it literally, if my server is working on something 24/7 for a month (31 days) that I'll be billed at $89.28 (24 * .120 * 31)? If I have an unusually high period of activity I don't want to receive a $1000 bill because I didn't fully understand the server pricing.
Also, would 2 m1.small instances perform about the same as 1 m1.medium instance, or is the relationship not entirely linear?
Thanks
Those $89.28 are indeed money billed for a month of ec2.medium instance usage. But you also should be aware of
DataTransfer costs (for example, if you host a web application, amout of data served to your end users is billed)
Storage price, as your instance should have some storage, same applies for backups (for example in form of snapshots, they are billed for space used)
You also might be billed for other services (such as EMR), but just in case you use them, so no need to worry right from the start.
Refer to EC2 price or price calculator
If you worry about unexpected bills, set up a billing alert. You'll be notified if your bill exceeds your expectations.
As for performance, 2 m1.small is roughly equal to m1.medium only in terms of CPU, but performance often depends on IO, architecture (32b vs 64b) and other factors. I had a use case when t1.micro instance outperformed m1.medium.
Related
Our organization has many EC2 on-demand instances. We never looked at the reserved instance pricing because we thought we had to pay up-front. But I see that now there are reserved instance with no up-front costs, but monthly.
This looks like what we need to keep costs down, but I am unclear as to how the reserved instance pricing is applied.
For example, we have 10 t3.medium ec2 instance. Let's say that there are 6 always running 24/7, but the other 4 are not running 24/7, they are turned off when not in use.
If I buy a reserved instance for t3.medium, how does AWS know to apply it to the instances running 24/7 and not part time?
For example, we have 10 t3.medium ec2 instance. Let's say that there
are 6 always running 24/7, but the other 4 are not running 24/7, they
are turned off when not in use.
If I buy a reserved instance for t3.medium, how does AWS know to apply
it to the instances running 24/7 and not part time?
Amazon doesn't apply reserved pricing to a specific instance at all. It basically just applies reserved pricing to your bill. It's like a discount at the time your bill is processed. If you have reserved pricing for N instances, and you have at least N instances running 24/7 reflected in your bill, then the reserved pricing gets applied to those N instances.
Amazon doesn't really care if you are running a single specific instance 24/7, or deleting and recreating instances once a minute. In the end it's just the total number of seconds you have a specific type of instance running each month that they care about, and bill you for.
Be aware that when you setup instance reservations it is actually a capacity reservation. You are telling Amazon you are committing to running this type of instance 24/7 for either 1 year or 3 years. By letting Amazon know this, it helps with their capacity planning, and in return they give you a cost discount. But it also means that they are going to charge you for that reserved capacity even if you don't actually have that instance running 24/7.
I'm getting ready to launch a mobile app that I have hosted on AWS with an EC2 instance. ($0.0464 per On Demand Linux t2.medium Instance Hour).
This past month I was charged $112 for the EC2 usage, but only had a handful of internal users testing the private version of the app. It's a fairly simple app, not anything that should require a lot of computing power.
So what I'm wondering is if 10 users and dev team costs $112/mo, what happens if I get 1,000 users, or 10k users? Would the cost increase 100x, 1000x? I can't imagine getting auto-billed for $112,000 for a month of service with a small user base like 10k users.
Thanks for any help and guidance, I don't know much about AWS.
Here are the details of my billing for last month:
The billing page shows 2219 hours of t2.medium during this billing month.
That is the equivalent of 92 days. So, it might be 3 instances running for a full month.
Amazon EC2 is charged when the instance is in the Running state. If you are not using an instance, you can Stop the instance. The attached disks (EBS) will still be charged, but there will be no charge for the instance itself.
The charge is not based on the number of users, nor how 'busy' the instance is. It is simply charged when the instance is 'running'. This is because computer resources are exclusively assigned to instances (CPU, RAM) that nobody else can use.
Bottom line: Stop instances that you don't need. Use the smallest instance type for your use-case to reduce costs.
If you were not aware of the charges involved, you can contact AWS Customer Service and request a refund.
FYI, the T2 and T3 family are great for workloads that occasionally 'burst' but then have low-usage periods, but they are not great for sustained workloads. See: Burstable performance instances - Amazon Elastic Compute Cloud
I have one RDS instance on AWS under the free tier, and I've been monitoring the resources I'm using. Under the free tier, I have 20 GB-Mo of RDS - Storage and 750 Hrs of RDS - Instance. I have just one RDS instance, but my Month-end forecasted usage surpasses the free tier limits, even if I'm not even using it (the RDS Instance is active, but I'm not effectively using it for anything yet).
Since I have just one RDS instance active, it doesn't make sense that I'm surpassing RDS instance free tier usage, I think. I just wanted to clarify if those two services (RDS-Storage and RDS-Instance) actually mean what I think (RDS-Storage is the amount of actual storage I'm using from my RDS database and RDS-Instance is the amount of time the instance has been running since the start of the month, right?).
Am I missing anything? (I know that I'm not giving much information, but I'm new to AWS and I don't know which kind of information would be useful)
AWS only can answer this question and here is their explanation.
The "Forecast" function is designed to be a rough prediction of your
monthly AWS usage, based on your month-to-date charges.
Although most AWS services bill on-demand, meaning your overall bill
steadily increases over the course of a month, some services or
features bill a larger amount once, usually on or near the first of
the month.
This might cause your forecasted usage to appear higher than you
expect at the beginning of a month, because your average daily cost is
higher at the beginning of the month than it will be over the course
of that month. As the month progresses, your usage should normalize,
and the forecast will be a more accurate prediction of your final
monthly bill.
More can be read from :
https://aws.amazon.com/premiumsupport/knowledge-center/high-aws-cost-forecast/
http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-forecast.html
Currently i'm building a chat application base on NodeJs
So i considered choose which is the best instance type for our server?
Because AWS have a lot of choice: General purpose, compute optimize, memory optimize ....
Could you please give me advise :(
You can read this - https://aws.amazon.com/blogs/aws/choosing-the-right-ec2-instance-type-for-your-application/
Actually it doesn't matter what hosting you chose -AWS, MS Azure, Google Compute Engine etc...
If you want to get as much as you can from your servers and infrastructure, you need to solve your current task.
First of all decide how many active users at the same time you will get in closest 3-6 months.
If there will be less than 1000k active users (connections) per second - I think you can start from the smallest instance type. You should check how you can increase CPU/RAM/HDD(or SSD) of your instance.
SO when you get more users you will have a plan how to speed up your server.
And keep an eye on your server analytics - CPU/RAM/IO utilizations when you are getting more and more users.
The other questions if you need to pass some certifications related to security restrictions...
Since you are not quite sure where to start with, I would recommend to start with General Purpose EC2 instance for production from M category (M3 or M4). You can start with smaller instance type like m3.medium.
Note: If its an internal chat application with low traffic you can even consider T series EC2 instances.
The important part here is not to try to predict the capacity needs. Instead you can start small with general purpose EC2 instance and down the line looking at the resource consumption of EC2 instance you can do a proper capacity planning. Since you can both Scale the instances Horizontally and Vertically, it will require to trade of the instance type also considering Cost and timely load requirements before selecting the scaling unit of EC2 instance.
One of the approach I'm following is as follows
Start with General Purpose Instance (Unless I'm confident that there are special needs such as Networking, IO & etc.)
Do a load test(Without Autoscaling for a single EC2 instance) of the application by changing the number of users and find out the limits (How many users can a single EC2 instance can handle).
After analyzing the Memory, CPU & IO utilization, you can also consider shifting to a different EC2 category or stick with the same type. (Lets say CPU goes to its limit but memory is hardly used, you can consider using C series instances).
Scale the EC2 instance vertically by moving to the next size (e.g m3.medium to m3.large) and carry out the load tests to find out its limits.
After repeating step, 3 and 4 you can find an optimal balance between Cost and Performance.
Lets take 3 instance types with cost as X for the lowest selected (Since increasing the EC2 size in one unit, makes the cost doubles)
m3.medium - can serve 100 users, cost X
m3.large - can serve 220 users, cost 2X
m3.xlarge - can serve 300 users. cost 3X
Its an easy choice to select m3.large as the EC2 instance size since it can serve 110 per X cost.
However its not straight forward for some applications where you need to decide the instance type based on your average expected load.
Setup autoscaling and load balancing to horizontally scale the EC2 instances to handle load above average.
For more details, refer the Architecting for the Cloud: Best Practices whitepaper.
I would recommend starting with a T2.micro Linux instance. Watch the CPU usage in CloudWatch. Once the CPU usage starts to exceed 50% to 75%, or free memory gets low, or disk I/O gets saturated, switch to the next larger instance.
T2.micro Linux instances are (for the most part) free. Read the fine print. T2.micro instances are burstable which means that you can get good performance from a small instance.
Unless your chat application has a huge customer / transaction base, you (probably) won't need the other instance types.
I'm new to AWS and have been tasked to look at ways to optimize cost. I have gone through the best practices and strategies to do that:
Instance Right Sizing
Using Reserved Instances (RI) & Spot instances (SI) as appropriate (over On-Demand)
Auto Scaling Storage (Reduced Redundancy, Glacier)
Tagging strategies
However, I have specific questions around the instance type. Apparently, we have a r3.xlarge (On-Demand) instance used for demos (for new clients) with 240 GB EBS (i.e. 4 CPU, 30.5 GB RAM), therefore it's not used very frequently.
Questions :
1) Will replacing it with a t2 instance give any cost benefits (in medium to long term) without degrading performance (or any other adverse effects)?
2) If so, which t2 variant can be used (t2.xlarge, t2.2xlarge etc)?
Sorry for my ignorance if this is not the proper place for the question, any guidance would be much appreciated.
Thanks for your help!
T2 instances will only save you some money on smaller instances. Bigger ones, like t2.xlarge has no advantage over let's say memory optimized instances unless you need burstable processing resources for a period of time. The amount of available memory will be the same.
You can compare the specs and prices here. As you see, t2.xlarge costs $0.243 and r4.large costs $0.24 per hour. Both have (approximately) 16 GBs of memory, the latter has 4 vCPUs though (these are for Windows instances / Ireland).
Finally, note that it all depends on your usage. The T instances are more suitable for test and development environments.
If you have an Amazon EC2 instance that is used infrequently, then the best way to save money is to stop the instance. On-Demand instances are charged only when they are running. (EBS volume storage will continue to be charged, but there will be no EC2 charge.)
Therefore, the best plan for your situation is:
Confirm that the current instance size is appropriate for your use-case (r3.xlarge has 30.5GB of RAM -- do you need that much memory?)
Stop the instance when it is not in use
Start the instance when it is required again