Skip to content

1. 什么是 Amazon CloudFront ?

Amazon CloudFront 是 AWS 的 CDN,是一个用于加快将静态和动态的 Web 内容(如: .html, css, .js, 图片文件)分发给用户的Web 服务。举个简单的例子来说明。比如你在中国,想请求一张 Web 服务器位于美国的图片,在检索到图片之前,这个请求会从一个网络路由到另一个网络,在经历 n 多个路由后,才能到达该图片所在的服务器,这是一个非常大的跳数,同时会对性能、可用性和可靠性产生很大影响。但是如果将原始服务器与 CloudFront 关联(关联后 CloudFront 知道从哪些原始服务器获取资源),这时不再通过原始服务器访问图片,而是通过 CloudFront 分配的 URL 访问图片,则该请求将被路由到迟延最短的 CloudFront 边缘站点。如果该内容在迟延最短的 CloudFront 边缘站点的缓存中存在,则将直接从该边缘站点的缓存中返回图片。如果请求的内容不在该边缘站点的缓存中,才从源去取(请求的内容不在缓存中,这里写的比较笼统,这种情况下 CloudFront 是如何工作的,详细工作流程,见下面 Note 的解释)。这样大大减少了路由数,从而提高了性能。

1.1CDN优势

优势

1.2CDN技术支持

CDN技术支持势

2.CloudFront

  • 使用和部署

使用和部署

  • 相关概念

相关概念

  • 交互与安全

cdn5

3,文档

ec2介绍

https://aws.amazon.com/cn/ec2/instance-types/

aws预估费用

*http://calculator.s3.amazonaws.com/index.html\*

https://aws.amazon.com/ec2/pr2icing/

磁盘

https://aws.amazon.com/cn/ebs/pricing/

s3

https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/userguide/Welcome.html

ec2

https://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/general-purpose-instances.html#general-purpose-network-performance

  • 价格

https://www.instance-pricing.com/provider=aws-ec2/instance=m5zn.3xlarge/

AWS 网络测试地址

测试你本地的网络到亚马逊各个可用区的网络 https://www.cloudping.info/

AWS 测试IP获取

亚马逊提供的各个可用区和地域的网络 http://ec2-reachability.amazonaws.com/

AWS云服务器价格计算器

AWS WEB 价格计算器网址 https://calculator.s3.amazonaws.com/index.html

aws命令客户端引导:https://docs.aws.amazon.com/cli/latest/index.html

aws国内产品信息及定价:https://www.amazonaws.cn/products/

aws海外产品价格计算:https://calculator.aws

epel

Amazon Linux 2:

Install the EPEL release package for RHEL 7 and enable the EPEL repository.

sudo amazon-linux-extras install epel -y



Amazon Linux Amazon Machine Image (AMI):
sudo yum-config-manager --enable epel



RHEL 8:
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
sudo dnf config-manager --set-enabled codeready-builder-for-rhel-8-rhui-rpms



Install and enable the EPEL release package for RHEL 7.

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm



CentOS 8:

Install the EPEL release package for RHEL 8. Enable both the EPEL and PowerTools repositories. The PowerTools repository contains development tools required by many EPEL packages.

sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
sudo dnf config-manager --set-enabled PowerTools
CentOS 7:

Install and enable the EPEL release package. CentOS 7 includes the epel-release package in the base repositories.

sudo yum -y install epel-release
Amazon Linux 2:

Install the EPEL release package for RHEL 7 and enable the EPEL repository.

sudo amazon-linux-extras install epel -y



Amazon Linux Amazon Machine Image (AMI):
sudo yum-config-manager --enable epel



RHEL 8:
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
sudo dnf config-manager --set-enabled codeready-builder-for-rhel-8-rhui-rpms



Install and enable the EPEL release package for RHEL 7.

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm



CentOS 8:

Install the EPEL release package for RHEL 8. Enable both the EPEL and PowerTools repositories. The PowerTools repository contains development tools required by many EPEL packages.

sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
sudo dnf config-manager --set-enabled PowerTools
CentOS 7:

Install and enable the EPEL release package. CentOS 7 includes the epel-release package in the base repositories.

sudo yum -y install epel-release

FAQ

1.磁盘故障

故障现象(2021-04-25):
	1,出现问题时间节点将近晚上9点,持续报警,开始查看问题,联系aws
	2,经过aws最终查询是磁盘写入性能达到瓶颈,从而导致系统崩溃

解决方案:
	针对目前方式对磁盘升级,gp2的话1G可以增加3个 iops,现有磁盘是200g
    升级到600g  1800ips
故障现象(2021-04-25):
	1,出现问题时间节点将近晚上9点,持续报警,开始查看问题,联系aws
	2,经过aws最终查询是磁盘写入性能达到瓶颈,从而导致系统崩溃

解决方案:
	针对目前方式对磁盘升级,gp2的话1G可以增加3个 iops,现有磁盘是200g
    升级到600g  1800ips

blog:

https://www.cnblogs.com/syavingcs/p/8583060.html#申请弹性ip