Content Retrival
Last updated
Last updated
User Requesting a Webhash-Hosted Website
1️⃣ User visits a website (example.com
)
The website’s domain (example.com
) is connected to a Webhash Gateway (gateway1.com
) using DNS settings.
2️⃣ Gateway (gateway1.com
) Receives the Request
The request passes through Varnish Cache before reaching the backend content retriever.
3️⃣ Varnish Cache Checks for Cached Content
If content is cached, it is served instantly from memory.
If not cached, the request is sent to the Hosting Layer to fetch the CID.
4️⃣ Hosting Layer Retrieves Content from Storage Nodes
The Hosting Layer queries the IPFS DHT to locate a Hosting Node storing the CID.
If a Hosting Node has the CID, it sends the content to the gateway.
If no Hosting Node has the CID, the request fails with a ‘Content Not Found’ response.
5️⃣ Content is Cached in Varnish and Served to the User
Once retrieved, Varnish stores the content in RAM for future requests.
The user receives the website quickly on subsequent visits.