Route VCL P3: ghost sets X-Ghost-VCL-Slot for the matched route

Open
#98 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
68/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
go
Domain
backend

Research direction

Start with the Route type and ghost VMOD configuration in internal/ghost, then find where matched routes set X-Gateway-Route and X-Gateway-Listener and where the preamble strips internal headers. Add the slot header for routes with a slot and ensure it is absent otherwise. Write a VTC covering both cases; backend filtering is optional and depends on the capacity spike.

Written by the indexing model from the issue text.

Description

enhancement

Part of #94. Depends on the ghost instance-state work in #93, which has landed.

Ghost decides which route a request matched, so ghost is what tells the master VCL which slot to jump to.

Work

  • Add vcl_slot to the Route type in internal/ghost and to the ghost VMOD's config.
  • Set X-Ghost-VCL-Slot on the request when the matched route has a slot, alongside the existing X-Gateway-Route and X-Gateway-Listener.
  • Strip X-Ghost-VCL-Slot in the preamble's trust-boundary block, like the other internal headers.
  • Optional, depending on the capacity spike: a constructor argument so a route VCL's ghost instance builds only the backends its own routes need, instead of a full copy of the backend set.

Done when

A VTC shows the header set for a route that has a slot, and absent for one that does not.

Notes

Size S.

Dominant language
Go
Stars
16
Forks
3
Avg merge
5d 15h
Merged PRs (30d)
10

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from varnish/gateway

All issues in varnish/gateway

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.