当前位置:网站首页>What is ssr/ssg/isr? How do I host them on AWS?
What is ssr/ssg/isr? How do I host them on AWS?
2022-06-27 19:40:00 【Immortal Jiang】
summary .
In this article , We are going to discuss how to AWS Up operation SSR/SSG/ISR as well as App Runner The charm of .
Content
We will first explain the traditional and modern network applications respectively . Next , We'll show you how to AWS Hosted on SSR/SSG/ISR.
Traditional network application and modern network application
Traditional network applications
Traditional network applications
=> Application processing is only performed on the server side
for example ,Java Of Spring,Python Of Django,Ruby Of Rails.

Modern network applications
Reactive Web Application
The application is handled separately on the server side and on the client side .
Client rendering (CSR)
=> Sigle Page application (SPA) It's a use CSR Created applications .
-React, Vue, Angular, etc. .Server-side rendering (SSR)
- next ,Nuxt, wait .Static site builder (SSG)
Jamstack Mechanism 、Gatsby、Hugo、Next、Nuxt And others .
Incremental static regeneration (ISR)
- The next page (9.4 Features added in version )
CSR( Client rendering )/SPA(Sigle Page application ).
First, retrieve the empty HTML, And then use JavaScript Generate the entire page . According to the data obtained at the client , The entire page is rewritten , No page conversion .

SPA The challenge of
First, access and load a large number of JavaScript, Then process the entire page , This makes the first load slow . The biggest problem is around SEO. If you don't explain JavaScript, Search engine crawlers will interpret empty HTML Modern Google crawlers can also interpret and execute JavaScript
Build dynamic OGP It's also a challenge as for KDDI Engineer portal , It also manages Blog, So it's not just about SEO measures , Also needed OGP measures .
SSR(Server Side Rendering)
Response request , Returns dynamically generated HTML It is also used on the server side JavaScript、 fictitious DOM etc. . The disadvantage is that the server side is very heavy ; If you use API Communication etc. , Slow response time .

SSG(Static Site Generator)
Pre generated HTML Is returned in response to a request SSG Generate at build time HTML Delivery is very fast , However, the page content cannot be dynamically changed after deployment

ISR(Incremental Static Regeneration).
Respond to a request , Return to the statically built page . When the expiry date is exceeded ,SSR Regenerate static pages asynchronously . While using the cache , Static pages can be updated automatically , If the request is made again after a period of time , The content will be updated , Because the content is built for the next time .
How to be in AWS Hosted on SSR/SSG/ISR
You only need a server to render ( Set up Nodejs It's OK to use the server ).

When you want ISR Cache problems at work
ISR Use cache to regenerate HTML.
=> therefore , As instances and containers expand , The cache time is also different , therefore HTML The response is also displayed differently , This depends on the LB An instance or container that receives access .
Are there any other options ?
Other options include a named Serverless Next.js Component and App Runner Third party tools .

in fact , Trust to Amplify It's OK, too .
Simple services for static website deployment pipeline and hosting It's perfect for SPA or Jamstack trusteeship . Amplify => Serverless Next.js Components seem to be based on it .
What is? App Runner?
APP Runner yes " stay AWS Build on 、 The easiest and fastest way to deploy and run a container web application ", That is, an item that allows you to AWS It is very easy and very fast to prepare and run container application services in the environment . let me put it another way , It is a program that allows you to AWS It is very easy and very fast to prepare and run container application services in the environment .
Why choose App Runner?
Of course , If it is the environment in which the container is running , that ECS That's all right. . However , Tell the truth , Even if ECS Fargate It's an option , Isn't it difficult to operate ? I think it's , Because I think it is .
App Runner
With Fargate, You have to manage containers 、 around VPC、ALB、NLB And automatic extension settings and Codebuild Combine , If you want to automate , but App Runner In a ( Hidden ) All of these are provided in the package .
stay App Runner Deployment in China
stay App Runner In the deployment method of , There is a feature that can do this automatically . In terms of use , If you push the container image to ECR Or push the source code to GitHub,App Runner Will detect it and deploy the container in a good way .
边栏推荐
- VS code 运行yarn run dev 报yarn : 无法加载文件XXX的问题
- Informatics Orsay all in one 1335: [example 2-4] connected block
- NVIDIA Clara-AGX-Developer-Kit installation
- 清华徐勇、段文晖研究组开发出高效精确的第一性原理电子结构深度学习方法与程序
- One week technical update express of substrate and Boca 20220425 - 20220501
- Implementation of reliable distributed locks redlock and redisson
- 【建议收藏】ABAP随笔-EXCEL-4-批量导入-推荐
- OpenSSL client programming: SSL session failure caused by an obscure function
- 深度学习和神经网络的介绍
- laravel框架中 定时任务的实现
猜你喜欢

Bit. Store: long bear market, stable stacking products may become the main theme

Keras深度学习实战(12)——面部特征点检测

深度学习和神经网络的介绍

Buzzer experiment based on stm32f103zet6 library function

laravel框架中 定时任务的实现

电脑安全证书错误怎么处理比较好
![[webinar] mongodb and Google cloud accelerate enterprise digital innovation](/img/ea/4680381ce78fd5d956ed009692b424.png)
[webinar] mongodb and Google cloud accelerate enterprise digital innovation

清华徐勇、段文晖研究组开发出高效精确的第一性原理电子结构深度学习方法与程序

Function key input experiment based on stm32f103zet6 Library

TIA博途_基于SCL语言制作模拟量输入输出全局库的具体方法
随机推荐
【云驻共创】高校数字化差旅建设“解决之道”
Gartner聚焦中国低代码发展 UniPro如何践行“差异化”
OpenSSL client programming: SSL session failure caused by an obscure function
基于STM32F103ZET6库函数按键输入实验
DFS and BFS simple principle
NVIDIA Clara-AGX-Developer-Kit installation
Technology sharing | introduction to kubernetes pod
Summary of domestic database certification test guide (updated on June 16, 2022)
基于STM32F103ZET6库函数蜂鸣器实验
明美新能源冲刺深交所:年应收账款超6亿 拟募资4.5亿
Alibaba's mission, vision and core values
Photoshop-图层相关概念-LayerComp-Layers-移动旋转复制图层-复合图层
Recommend several open source IOT platforms
什么是 ICMP ?ping和ICMP之间有啥关系?
Cucumber自动化测试框架使用
Open source summer 2022 | opengauss project selected and announced
Usage of rxjs mergemap
International School of Digital Economics, South China Institute of technology 𞓜 unified Bert for few shot natural language understanding
工作流自动化 低代码是关键
一位平凡毕业生的大学四年