当前位置:网站首页>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 .
边栏推荐
- Tupu digital twin intelligent energy integrated management and control platform
- Where to look at high-yield bank financial products?
- Summary of domestic database certification test guide (updated on June 16, 2022)
- Four years of College for an ordinary graduate
- Market status and development prospect forecast of the global shuttleless air jet loom industry in 2022
- 教你打印自己的日志 -- 如何自定义 log4j2 各组件
- IDEA 官网插件地址
- Garbage collector driving everything -- G1
- TIA博途_基于SCL语言制作模拟量输入输出全局库的具体方法
- 一位平凡毕业生的大学四年
猜你喜欢
![[elt.zip] openharmony paper Club - memory compression for data intensive applications](/img/b3/ab915f0338174cba1a003edc262a5d.png)
[elt.zip] openharmony paper Club - memory compression for data intensive applications

破解仓储难题?WMS仓储管理系统解决方案

全面解析零知识证明:消解扩容难题 重新定义「隐私安全」

数据分析师太火?月入3W?用数据告诉你这个行业的真实情况

Camera calibration with OpenCV

The IPO of Yuchen Airlines was terminated: Guozheng was proposed to raise 500million yuan as the major shareholder

China's Industrial Software Market Research Report is released, and SCADA and MES of force control enrich the ecology of domestic industrial software

im即时通讯开发之双进程守护保活实践

如何利用 RPA 实现自动化获客?

International School of Digital Economics, South China Institute of technology 𞓜 unified Bert for few shot natural language understanding
随机推荐
实战回忆录:从Webshell开始突破边界
昱琛航空IPO被终止:曾拟募资5亿 郭峥为大股东
Is Guosen Securities a state-owned enterprise? Is it safe to open an account with Guosen Securities?
Technology sharing | introduction to kubernetes pod
工作流自动化 低代码是关键
芯动联科冲刺科创板:年营收1.7亿 北方电子院与中城创投是股东
laravel框架中 定时任务的实现
谈谈线程安全
Cdga | what is the core of digital transformation in the transportation industry?
OpenSSL client programming: SSL session failure caused by an obscure function
labelimg使用指南
脉脉热帖:为啥大厂都热衷于造轮子?
Market status and development prospect forecast of global active quality control air sampler industry in 2022
Rxjs mergeMap 的使用场合
Market status and development prospect forecast of global aircraft hose industry in 2022
通过 G1 GC Log 重新认识 G1 垃圾回收器
高收益银行理财产品在哪里看?
Gartner聚焦中国低代码发展 UniPro如何践行“差异化”
从感知机到前馈神经网络的数学推导
Cloud native database: the outlet of the database, you can also take off