Cloud Services
this blog is used to introduce some cloud services.
Domain
cloud service company:namecheap
namecheap’s domain is cheap($1)
Introduce
Domain name is the alias of IP,which allows users to better remember the name of website.
Top-level Domains(First-level Domain):can be divided into three categories.
Generic Top-level Domain:.com/.net/.gov/.org/.edu etc
Country-code Top-level Domain:.cn/.tw/.hk/.jp/.ca (means domain is registed in this country)
New Generic Top-level Domain:.book/.online
Second-level Domain(main Domain):xxx.com (we usually buy this type of domain)
Third-level Domain etc.
From the perspectve of the users,com,etc,can be regarded as a domain name suffix,so the second-level domain name will be regarded as a first-level domain name.
Converter
In this part,i will introduce the converter dns server, which convert domain to a ip.
Generally,our domain name service provider is our DNS service provider.If we want to access another server,we must use another server’s ip(address).So if we want the domain name to take effect,we must ask the DNS server to convert the domain name to ip.
CNAME is used when the domain is redirect,and A is used when domain is pointed at ip.
host(Domain remove the part of second-level domain)’s value:@(space), *(any),www,xx.yy etc
github static page only supports @ and www.When you use github static page,I suggest you to use cname record,because ip address may changed in the future.
If there is no www in dns parse,dns server will automatically point to the default record(some dns server like Tencent cloud don’t do that,namecheap do that).This default record generally refers to @ record(main domain).
TTL refers to the cache time recorded in DNS.After this time,this recorde will invalid in dns server,until dns server complete query.Therefore,if the TTL smaller,there will be a lot of time during the query time,and only part of time can truely analyze dns record.If the TTL bigger,dns record will update slowly.
parsing,some government will notify the DNS service provider to remove this DNS analysis.This registeration is essentially a website registeration and needs to go through three steps:service provide’s registeration=>governement(online department)’s registeration=>government(local police department)’s registeration.The purpose of all this is to strengthen the supervision of the website and prevent fraud website ‘s appearing.Most country don’t need to registered like that.
About DNS,I will introduce the network management and control of some countries.How to achieve these network control? Delete or redirect these domains on DNS server.But if we need to access some govenment controled website,what should we do? use vpn(connect a proxy server in other country where can use dns parsing for these website).
We can use the number of qualified website blocked by each country to measure the strictness of each country’s newwork control.
When we were in the domain service provider to buy domain name,domain service provider need to register from ICANN.
SSL
Https Introduce:
https://drive.google.com/file/d/1EY96SrxV6QQ-wkSlntPIAoYK1om-k0dV/view?usp=share_link
https://drive.google.com/file/d/1601F0MJO2aTeqdm_1ZYY2sAIP-EczU6A/view?usp=share_link
https://drive.google.com/file/d/1f6UtufmMaS9Je8Tu9ugOpzGW8H2wP5a6/view?usp=share_link
cloud service company:Let’s Encrypt
Linux systems: https://drive.google.com/file/d/1f6UtufmMaS9Je8Tu9ugOpzGW8H2wP5a6/view?usp=share_link
1 | SHELL |
Host
cloud service company:namecheap,aws,azure
Remote connection tool(have both ssh and ftp):FinalShell
Object Storage
cloud service company:blackblaze,imgur(only provide picture storage)
backblaze
This website is designed very simply, and its response speed is moderate, not very fast (it takes a few minutes for the content to display on the website after uploading
backblaze provide cheap storage services for us.Next picture shows the free plan.
backblaze provide s3 and friendly url for us,we can use picgo to upload image to backblaze(use s3 URL),use cloudflare to crypto the friendly url.
CDN
Cloudflare
use cloudflare to crypto the friendly url
Cloudflare is a CDN (Content Delivery Network) service provider (other CDN providers include jsDelivr). It automatically offers DDoS (Distributed Denial of Service) protection, and it provides free and unlimited bandwidth. You can read more about their policies here: https://www.cloudflare.com/zh-cn/plans/
Cloudflare’s Bandwidth Alliance (details can be found here: https://www.cloudflare.com/zh-cn/bandwidth-alliance/) offers completely free traffic from bandwidth partners to Cloudflare.
By layering Cloudflare over Backblaze, you only need to focus on the number of origin fetches and the amount of data transfer from Backblaze. This approach significantly reduces the number of fetches and data transfer compared to accessing Backblaze directly. Additionally, considering the free source fetch policy of the Bandwidth Alliance, it can significantly lower costs.
1,Add Domain
After adding the domain, you need to specify the DNS servers (provided by Cloudflare) at the DNS service provider’s end.
Regarding domain names, it’s important to note that having a second-level domain is sufficient. The official website can directly use “www” and an empty third-level domain, while images can use “image,” and so on. This simplifies management and saves costs.
2,Add SSL Strategy
Use the Full (Strict) SSL mode and leverage Cloudflare’s built-in SSL features.
Notes:
a. Cloudflare accesses the upstream server (Backblaze) via pure HTTP, not HTTPS.
b. However, Backblaze only supports secure HTTPS connections, causing HTTP requests to fail.
c. To address this issue, in the Cloudflare dashboard under the “SSL/TLS” section, change the encryption mode from “Flexible” to “Full (Strict)” so that Cloudflare connects to Backblaze via HTTPS, requiring a CA-issued certificate (utilizing Cloudflare’s built-in SSL certificate for free).
3,Add Domain Mapping Transformation Strategy
When pointing to a storage bucket, it’s essential not to expose the bucket’s name. For example, using Backblaze, it’s easy for others to discover the source URL from the origin header and potentially engage in unauthorized usage.
Important Note: DNS resolution can point to domain names and IPs without the need for ownership verification,
4,Remove Backblaze-Related Information from Response Headers
5,Add Page Caching (Set Cache Time and Cached Content)
It’s important to note that when configuring whole-page caching, you only need to specify it like this: “liamgrant.online/*.” This matches both HTTP and HTTPS, as well as all paths under this domain and its subdomains.
Important Note: Cloudflare’s caching doesn’t synchronize your content across all nodes simultaneously. Typically, it caches content where it’s needed (based on physical locations). If you’re using a VPN with dynamic IP addresses, it may prevent consistent cache hits due to constantly changing physical locations.
API
message:twilio