When should I use a t2.medium vs. a m3.medium instance type within AWS?

0 votes

They appear to be approximately the same in terms of performance.

Model vCPU Mem (GiB) SSD Storage (GB) m3.medium 1 3.75 1 x 4

Model vCPU CPU Credits / hour Mem (GiB) Storage t2.medium 2 24 4 EBS-Only

t2.medium allows for burst-able performance whereas m3.medium doesn't. t2.medium even has more vCPU (1 vs 2) and memory (3.75 vs 4) than the m3.medium. The only performance gain is the SSD w/a m3.medium, which I recognize could be significant if I'm doing heavy I/O.

Would this be the only scenario where I would choose an m3.medium over a t2.medium?

I'd like to run a web server that gets 20-30k hits a month so I suspect either is okay for my needs, but what's the better option?

Aug 17, 2018 in AWS by bug_seeker
• 15,350 points
441 views

1 answer to this question.

0 votes

30000 hits per month is on average a visitor every 90 seconds. Unless your site is highly atypical, load on the server is likely to be invisibly small. Bursting will handle spikes up to hundreds (or thousands, with some optimizations) of visitors.

With appropriate caching, a VPS server of comparable specs to a t2.micro can serve a Wordpress blog with 30000 hits PER MINUTE. If you were saturating that continuously, you couldn't rely on burst performance for the t2.micro, of course. A t2.medium is roughly 4x as powerful in all regards as a micro, and a m3.medium has similar RAM and bandwidth but less peak CPU.

The instance storage will be a few times faster than a large EBS GP2 (SSD) volume on the m3.medium, of course. The t2 & c3 medium instances will both have roughly 300-400 Mbit/s network bandwidth, t2.micro gets ~60-70 Mbit. One benchmark shows that t2.medium in bursting mode actually beats a c3.large (let alone the m3.medium, which is less than half as powerful, at 3 ECU vs 7).

But as noted, you can probably save money by using something less powerful than either of your suggestions and still have excellent performance.

If you don't need the power to completely configure your server, shared hosting or a platform-as-a-service solution will be easier. I recommend OpenShift, because they explicitly suggest a single small gear for up to 50k hits a month. You get 3 of those for free.

If you do need to configure the server, you really only need enough memory to run your server and/or DB. A t2.nano has 512 MB, and a t2.micro has 1 GB. The real performance bottlenecks will probably be disk I/O and network bandwidth. The first can be improved with a larger general-purpose SSD volume (more IOPS), the second by using multiple instances and an ELB.

Make sure you host all static assets in S3 and use caching well, and even the smaller AWS instances can handle hundreds of requests per second.

Basically: "don't worry about it, use the cheapest and easiest thing that will run it."

answered Aug 17, 2018 by Priyaj
• 56,520 points

Related Questions In AWS

0 votes
1 answer

AWS EFS vs EBS vs S3 (differences & when to use?)

Parameters S3 EBS EFS Access Can be accessed publicly  Accessed only through given ...READ MORE

answered Aug 8, 2018 in AWS by ArchanaNagur
• 2,270 points
165 views
0 votes
1 answer
+1 vote
2 answers
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
148 views
0 votes
1 answer
0 votes
1 answer
+1 vote
2 answers

How do I run python script on aws EC2 instance(ubuntu)?

I believe that you are using the ...READ MORE

answered Apr 17, 2018 in AWS by Cloud gunner
• 4,260 points
1,956 views