Serving a Website as only Cached HTML Pages

Lets say that I want to develop a website where all pages will be dynamically generated and ‘printed’ into static HTML files. I will then serve these HTML files from a container (such as an Amazon EC2 instance) that has no server side languages or database running in the background.

I will make a script to have the HTML files automatically refreshed at a set period.

My reasons for doing this would be to decouple the link between traffic to my website and server load (in other words, so my website can scale without any need for additional CPU / RAM on the server).

Here are some benefits that i expect from doing it this way

  • I want a cheap way to host a high traffic website that can accommodate large spikes in traffic (from viral content)
  • I want it to load as fast as possible — without any delay from generating content dynamically for each visitor.

My Questions are as follows:

  • What are the downsides of structuring a website this way?
  • Is this flat out a bad idea?
  • What is this type of architecture called?

My Background

I have made a few simple web apps using PHP / mySQL and am familiar with javascript, hmtl, css— basically a new / amateur web developer.

What are the downsides of structuring a website this way?

The main problem is dealing with pages that change per user. For example, your website has an user system, so for each user that logs in, would you then generate a new page and cache it?

Is this flat out a bad idea?

No, it’s an excellent idea. As a matter of fact, static content is often served like this.

What is this type of architecture called?

I don’t think it has a specific name.


There’s some things I would like to recommend to you.

I want a cheap way to host a high traffic website that can accommodate large spikes in traffic (from viral content)

First of all, what do you define as high traffic? My $10 a month VPS can serve thousands of pages per second on just a single of core, running nginx.

See if you can’t get around with a caching solution first. There are plenty available or you could roll your own specific to what you need. Making a basic one is generally pretty simple and it gives you control over what pages you want cached and which you don’t.

0

What are the downsides of structuring a website this way?

Obviously, the downside is inability to do typical “dynamic” stuff like CRUD with forms. Of course, you can still use some 3rd party API for contact forms and comments, like Disqus or Muut.

Is this flat out a bad idea?

No, it is an excellent solution for static sites. It is indeed very fast, yet very limited to its’ use case.

Take a look at Jekyll (and sites using it) and similar static site generators. It is pretty easy to start with, there are lots of tutorials. GitHub pages is one of free hosting platforms for static sites, integrated with Jekyll. You can set up custom domain, so it should fit your needs. I’m not saying it’s the best, it’s just the one I use.

What is this type of architecture called?

“Static website/page generator”. It is not an architectural pattern name, just the category of software. I don’t think there is any specific term other than just “static website”.

I will make a script to have the HTML files automatically refreshed at a set period.

Just push updated content when you change something, that is more efficient.

0

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật