|
| 1 | +--- |
| 2 | +layout:pattern |
| 3 | +title:Static Content Hosting |
| 4 | +folder:cloud-static-content-hosting |
| 5 | +permalink:/patterns/cloud-static-content-hosting/ |
| 6 | +categories:Cloud |
| 7 | +tags: |
| 8 | +-Cloud distributed |
| 9 | +--- |
| 10 | + |
| 11 | +##Intent |
| 12 | + |
| 13 | +Deploy static content to a cloud-based storage service that can deliver them directly to the client. |
| 14 | +This can reduce the need for potentially expensive compute instances. |
| 15 | + |
| 16 | +##Explanation |
| 17 | + |
| 18 | +Real world example |
| 19 | + |
| 20 | +>A global marketing web site with static content needs to be quickly deployed to start attracting |
| 21 | +>potential customers. To keep the hosting expenses and maintenance minimum, a cloud hosted storage |
| 22 | +>service along with content delivery network is used. |
| 23 | +
|
| 24 | +In plain words |
| 25 | + |
| 26 | +>Static Content Hosting pattern utilizes cloud native storage service to store the content and |
| 27 | +>global content delivery network to cache it in multiple data centers around the world. |
| 28 | +
|
| 29 | +Wikipedia says |
| 30 | + |
| 31 | +>A static web page (sometimes called a flat page or a stationary page) is a web page that is |
| 32 | +>delivered to the user's web browser exactly as stored, in contrast to dynamic web pages which are |
| 33 | +>generated by a web application. |
| 34 | +> |
| 35 | +>Static web pages are suitable for content that never or rarely needs to be updated, though modern |
| 36 | +>web template systems are changing this. Maintaining large numbers of static pages as files can be |
| 37 | +>impractical without automated tools, such as static site generators. |
| 38 | +
|
| 39 | +**Programmatic Example** |
| 40 | + |
| 41 | +``` |
| 42 | +``` |
| 43 | + |
| 44 | +##Applicability |
| 45 | + |
| 46 | +Use the Static Content Hosting pattern when you want to: |
| 47 | + |
| 48 | +* Minimize the hosting cost for websites and applications that contain some static resources. |
| 49 | +* Build a globally available web site with static content |
| 50 | +* Monitor the web site traffic, bandwidth usage, costs etc. |
| 51 | + |
| 52 | +##Typical Use Case |
| 53 | + |
| 54 | +* Web sites with global reach |
| 55 | +* Content produced by static web site generators |
| 56 | +* Web sites with no dynamic content requirements |
| 57 | + |
| 58 | +##Real world examples |
| 59 | + |
| 60 | +*[Java Design Patterns web site](https://java-design-patterns.com) |
| 61 | + |
| 62 | +##Credits |
| 63 | + |
| 64 | +*[Static Content Hosting pattern](https://docs.microsoft.com/en-us/azure/architecture/patterns/static-content-hosting) |