Global distribution
Cloud CDN caches files at Google's edge locations, so repeat visitors are served from a nearby cache instead of the bucket in Mumbai.
Cloud Computing Mini Project · Documentation
The site you are reading lives in a private Cloud Storage bucket. A global external Application Load Balancer terminates TLS with a Google-managed certificate, Cloud CDN caches every file at Google's edge, and plain HTTP is redirected to HTTPS. A companion command-line tool stores files as AES-256-GCM encrypted blocks in a second private bucket.
Host a portfolio site using Google Cloud Storage and integrate a CDN, to learn how content is distributed globally and served securely over HTTPS. The site is deployed the way production static sites are: a private bucket that nobody can read directly, a CDN in front of it, a TLS certificate managed by the cloud provider, and scripts that build and tear down the whole stack.
Cloud CDN caches files at Google's edge locations, so repeat visitors are served from a nearby cache instead of the bucket in Mumbai.
A Google-managed certificate is issued and renewed automatically. Port 80 only answers with a 301 redirect to HTTPS.
The site bucket has public access prevention on. Only the load balancer's service agent may read it.
One deploy script creates everything, with a dry-run mode. One teardown script removes it so nothing keeps billing.
| Resource | Name created by deploy script | Purpose |
|---|---|---|
| Cloud Storage bucket | <project>-site | Holds site/; main page index.html, not-found page 404.html |
| Backend bucket | portfolio-backend | Connects the bucket to the load balancer; Cloud CDN enabled |
| URL maps | portfolio-https-map, portfolio-http-redirect | HTTPS → bucket; HTTP → 301 redirect to HTTPS |
| Static IP | portfolio-ip | One global anycast IPv4 address for both ports |
| SSL certificate | portfolio-cert | Google-managed, for your domain or <ip-with-dashes>.sslip.io |
| Proxies + rules | portfolio-https-proxy, portfolio-http-proxy, portfolio-https-rule (:443), portfolio-http-rule (:80) | Accept connections on the static IP |
| Cloud Storage bucket | <project>-blocks | Encrypted blocks from securecloud.py |
34-8-1-2.sslip.io-style names resolve to the reserved IP with no DNS setup. That IP is anycast: Google announces it from many locations, so a visitor's packets enter Google's network at the nearest point of presence.
The HTTPS proxy presents the Google-managed certificate and completes the TLS handshake close to the visitor. Google issues the certificate once DNS points at the IP, and renews it automatically.
Cloud CDN checks the edge cache. On a hit the file is returned straight away, with an Age header saying how many seconds it has been cached. On a miss the request goes to the backend bucket.
The load balancer's service agent (service-PROJECT_NUMBER@https-lb.iam.gserviceaccount.com) reads the object from the private bucket. Cache mode FORCE_CACHE_ALL stores the response for the default TTL of 1 hour.
After uploading new files the script runs gcloud compute url-maps invalidate-cdn-cache for /*, so every edge fetches the new version on its next request.
The footer of the portfolio reads these headers live and shows whether the page came from the CDN cache.
Prerequisites: a Google Cloud project with billing or the free trial enabled, the Google Cloud CLI, and your own login. No service account keys are created or stored.
SecureCloud also includes securecloud.py, which splits a file into fixed-size blocks (like HDFS)
and encrypts each one on your machine before upload, so the blocks bucket only ever holds ciphertext. It connects
this hosting work to the secure-storage part of our group project.
A random 16-byte salt and your password go through scrypt (N=215, r=8, p=1) to give a 256-bit key. Only the salt and parameters are stored. The key never is.
Each block (1 MB by default) gets a fresh 96-bit nonce and is sealed with AES-256-GCM. The associated data file_id | index | count ties the block to its position.
manifest.json stores the SHA-256 of every encrypted block and of the whole file. A key_check value authenticates the manifest itself.
merge checks hashes, then the password (exit code 2 if wrong), then every GCM tag (exit code 3 if a block was tampered with), then the whole-file hash.
The same site and tool also run on AWS. infra/template.yaml (CloudFormation) creates a private S3
site bucket behind CloudFront with Origin Access Control, plus a private S3 blocks bucket, and
deploy.ps1 / deploy.sh deploy it. securecloud.py uses S3 by default
(--backend s3). Google Cloud became the main target because the AWS account was not verified for
CloudFront.
| Concept | Google Cloud (main) | AWS (alternative) |
|---|---|---|
| Object storage | Cloud Storage | Amazon S3 |
| CDN | Cloud CDN on a backend bucket | CloudFront distribution |
| Private origin access | Load balancer service agent (IAM) | Origin Access Control (SigV4) |
| Certificate | Google-managed SSL certificate | Default *.cloudfront.net certificate |
| HTTP → HTTPS | Redirect URL map on port 80 | Viewer protocol policy redirect-to-https |
| Cache invalidation | gcloud compute url-maps invalidate-cdn-cache | aws cloudfront create-invalidation |
| Provisioning | gcloud scripts (infra/gcp/) | CloudFormation template |
Suyash Makrand Chaudhari · B.E. Computer Engineering, MET Bhujbal Knowledge City, Institute of Engineering, Nashik · portfolio · csuyash2506@gmail.com