Yiwei Yu

Posted on: 2025-01-19

Introduction to EC2 RDS S3 and CloudFront

Before the introduction, let's take a look at what we need to run a project first.

Let's take running a Java Web Program as an example. First of all, we certainly need a computer with an operating system like Windows, MacOS, or Linux installed. Then, we install the JVM, Tomcat and Database on it, so that our program can successfully run. Yes, we actually only need a computer which is an instance, and then install software on it.

However, this will have some drawbacks. The first is the storage and access of static resources. If your website has a lot of visitors, the disk will soon be filled with images, videos, zips, and other files uploaded by users. More importantly, if your application is distributed, you need to share the static resources across multiple instances, which requires extremely complex setup and management. At the same time, although installing a database on an instance is indeed a feasible solution, if you have multiple databases that need to be accessed, managing them may be a problem. In addition, it may easily cause resource competition with your application.

Therefore, most cloud services such as Google Cloud Platform, Azure, and AWS provide solutions that manage the application, database, and storage of large files separately. 

For AWS, it recommends that you put the application separately on an instance, which is of course a complete computer (or virtual machine), including CPU, memory and hard disk, this is the EC2 instance rental service. Then, put the database into a container similar to docker, which also has separate CPU, memory and hard disk resources, which is the RDS. Finally, store large files in a separate space, which is called the S3 Bucket.

Except for these three services, since your application is placed on the public network, it can be accessed by people around the world. However, due to your instance being in a fixed place in the world, people from other distant places will experience greater network latency. 

AWS has a service called CloudFront for this situation. Amazon has placed many high-performance computers around the world, called nodes. If you enable the CloudFront service, when a distant user accesses the data in your instance, the access request will be sent to the node closest to the user first. If there is no requested data in that node, then that node will pull the original data from your instance and cache it in that node. In this way, When everyone near that node accesses the same data again, they no longer need to pull the original data from your remote instance. They just use the previously cached data, which greatly reduces network latency.

Okay, today I will only introduce these four important services of AWS. In the upcoming articles, I will start with registering domain names, go all the way to deployment projects and introduce other services.

This's enough for today.




Comments (
)
Sign in with Google account
0/500
Comment

Copyright © 2024 - 2025  Yiwei Yu       |        Designed  And  Built  By  Yiwei Yu       |       Email :  hiyiweiyu@gmail.com       |       Privacy Policy