/home/ahmetb
  • Blog
  • About me
  • Tweets
  • GitHub
  • Talks
03 June 2021

Serving gRPC+HTTP/2 from the same Cloud Run container

In this article I will show you how to code a Go server to serve both gRPC and HTTP/2 endpoints (h2c) from a single service. This is not trivial on Cloud Run so it warrants sample code. Normally, you could use the Go cmux package in your server app and multiplex h2c and grpc requests to the right http.Handlers. However, cmux makes this decision at the connection layer, and pins a connection forever to either h2c or grpc. Read More →

29 April 2021

My review of the System Design book

When I first heard of Alex Xu’s System Design Interview – An insider’s guide, my reaction was “finally someone wrote a book with deep discussions around scalable systems design”, so I purchased it.

tl;dr: If you are new to systems design and uninitiated in distributed systems space, this book should be an instant buy for you. If you are seeking answers to how Facebook scales, how APIs like AWS S3 work or want to learn trade-offs around distributed databases and queues, this book might leave you unsatisfied as it seems to be focused on getting the beginners to succeed in the interviews. Read More →

28 April 2021

Deploying to Cloud Run with Go

I’m continuing with these articles on Cloud Run REST API that nobody really needs to read. This time, I’m back with a Go code walkthrough that shows how to deploy and manage services in Cloud Run through its Go API client library.

Cloud Run already offers deployment via mainstream method like CLI, web UI, IDEs and Terraform. So this article is dedicated for the <%0.1 of Cloud Run users (a.k.a. the ones keeping it real) out there who needs to use Cloud Run API with Go. Let’s begin. Read More →

13 April 2021

Introducing runsd: Service discovery for Cloud Run

Today I’m open sourcing runsd, an unofficial DNS service discovery and authentication layer I’ve built for Cloud Run to make microservices networking easier.

If you’ve used Kubernetes or Docker Swarm to run microservices, then you are probably familiar with the concept of DNS service discovery. This lets you call another service as easy as connecting to http://hello. Your request will be routed to a container running the service named hello even if it’s on another machine on your cluster.1

However, Cloud Run currently does not offer a DNS service discovery experience and authenticating private services on Cloud Run requires you to make code changes which makes your services less portable (we’ll talk more about this soon). Read More →

08 April 2021

First look at GKE Autopilot

Last month Google introduced GKE Autopilot. It’s a Kubernetes cluster that feels serverless: where you don’t see or manage machines, it auto-scales for you, it comes with some limitations, and you pay for what you use: per-Pod per-second (CPU/memory), instead of paying for machines.

In this article, I’ll do a hands-on review of GKE Autopilot works by poking at its nodes, API and run a 0-to-500 Pod autoscaling to see how well it scales from a user’s perspective.

  1. Cluster creation
  2. Poking at nodes
  3. System Pods (kube-system)
  4. limits vs request overriding behavior
  5. Autoscaling under pressure: zero to 500 pods
  6. Conclusion
Read More →

09 March 2021

Building a high-scale chat server on Cloud Run

In this blog, I will show you how to use WebSockets support to build a fleet of serverless containers that make up a chatroom server that can scale a high number of concurrent connections (250,000 clients).

Architecture Diagram Read More →

22 February 2021

WebSockets best practices for Cloud Run

I’ve published documentation on best pratices for running WebSockets applications such as chatrooms or game servers on Cloud Run’s stateless environment.

Cloud Run now supports WebSockets (and gRPC streams!) so I wrote a best practices guide for you to architect your streaming apps properly in a serverless world.https://t.co/MMJNhsbUVS pic.twitter.com/tu7msYtH0Z

— Ahmet Alp Balkan (@ahmetb) February 19, 2021
Read on cloud.google.com

10 February 2021

Global services with Cloud Run (Terraform edition)

Last year, I wrote a tutorial on deploying a serverless application to all Google Cloud regions, and route your users to the closer region using a load balancer with anycast IP. (I’ve since moved that article into our documentation). It was a 13+ step tutorial to get it working.

Naturally, I scratched the itch and released a Terraform module that makes this much easier. I posted it on Twitter, and it got over 200 likes, so I decided to write about how this works. In this article I’ll show you how you can automate deploying to “all regions”much easier using this new Terraform module. This repository contains all the code and examples I’ll talk here. Read More →

  • ««
  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • »
  • »»