Skip to content

Adding caching to HTTP-Router

Bojan Marjanovic requested to merge 13-consider-adding-caching-to-http-router into main

Why

As per #13, we should introduce some caching logic to our HTTP-Router.

What

Following the Cloudflare Docs on caching, we're introducing a new layer that will cache all requests going to the Topology Service.

Currently, we're caching all request per their type and value.

Steps to reproduce

  1. Checkout the 13-consider-adding-caching-to-http-router branch in your local GDK
  2. Update the wrangler.toml inside gitlab-http-router repo to include GITLAB_TOPOLOGY_SERVICE_URL = "http://localhost:9096/"
  3. Enable the Topology Service in your GDK gdk config set gitlab_topology_service.enabled true
  4. Run gdk reconfigure
  5. Update the classify.go file inside the GDK's gitlab-topology-service repo to include some kind of logging, e.g. (fmt.Println("Got request to classify FirstCell") inside the classifyFirstCell() function.
  6. Run gdk tail gitlab-topology-service in your terminal
  7. Verify that request are successfully cached! 🎉
Edited by Bojan Marjanovic

Merge request reports