-1

Is it more efficient to store icons and small decorative images (eg arrow.jpg or Submit.jpg etc) on S3 vs on the hosting server's local disk ?

images/arrow.jpg (relative url to the hosting server)

vs

https://aws.com/images/arrow.jpg

I am not concerned about the storage/space but the number of hits to the server because every page may contain 50 to 100 such icons and small images. I am not using CDN

marcg
  • 552
  • 1
  • 8
  • 20
  • 3
    What do you mean by "efficient"? Are you referring to cost, performance, storage space, or something else? – John Rotenstein Feb 12 '22 at 11:34
  • Performance. Note they are small images, icons. 4 5 kbs each. I am not concerned about space here but the number of hits to the server because a page may contain 50 such icons/images – marcg Feb 12 '22 at 18:50
  • 2
    Amazon S3 is a highly parallel system that is continually serving millions of requests. It is going to perform much better than an individual web server. For top-level performance, however, you could use a CDN like Amazon CloudFront since it can cache content closer to your users. – John Rotenstein Feb 12 '22 at 21:20

1 Answers1

1

When you say hosting server, you are ultimately going to store your volume on EBS, EFS ,( not instance store because it is not persistent).

There are many factors to distinguish based on efficiency but ultimately it will boil down to COST.

  • S3 is way cheaper, highly available, and more durable than EBS.
  • EBS is AZ bound but s3 is not. if you want to access to ebs in another az you will need to copy and snapshot and restore to another AZ.
  • with s3 you can utilize intelligent teiring with lifecycle policies to move your files automatically between different storage tiers for cost optimization.
  • however, if you want to fast access and low latency then EBS and EFS is a better option without a doubt.
  • s3 gives you unlimited storage but individual element size is limited to 5TB

For performance go for ebs , for cost go for s3.

NOTE : if you want to access your data on ebs or efs you would need to spin up an ec2 instance which also add cost

FAq for comparison s3 v/s ebs v/s efs

This post on stack is also a good read AWS EFS vs EBS vs S3 (differences & when to use?)

Jatin Mehrotra
  • 9,286
  • 4
  • 28
  • 67