Repository navigation
v0.48.0
The Rust data plane serves more of what it used to forward, and the image's Python is faster. With Redis, the data
plane now serves rate-limited keys and servers with QUERYAPIGATE_RATE_LIMIT, counting in Python's own buckets, and it
serves keys with their own query_timeout and max_rows, with or without Redis. The image runs Python 3.13 from
python-build-standalone and carries no pip. If you build an image FROM this one and pip install into it, see
Changed. One security fix, for workspaces only: two workspaces' keys of the same name shared a rate limit. On upgrade,
each key's rate-limit bucket starts full once.
Added
- The Rust data plane (experimental) serves rate-limited keys, and servers with
QUERYAPIGATE_RATE_LIMIT, when
Redis is set (ADR 0032). Before, it forwarded every call such a key made, and every call on such a server. It
counts them in Python's own buckets in Redis, with Python's script, so a key has one budget whichever process takes
its call. It counts a call only when it is going to serve it. A call it forwards after counting says so, and
Python doesn't count it again.- Its 429s are Python's, body and headers alike. They count in
queryapigate_rate_limit_rejections_total,
the request counters and the rate-limit alerts, as Python's own do. - Without Redis, limited calls are still forwarded: each process would count its own budget.
- If Redis fails, it forwards limited calls for 5 seconds at a time, and Python counts them as it does now.
- Its Redis user can be limited to counting:
EVALSHA,SCRIPT LOADand the script's own commands, on
qag:ratelimit:*(guide 64). - Measured: per gateway core, a limited key through the data plane served 4.4x Python's calls a second, and
5.0x with the server-wide limit too. Each limit counted adds a Redis round trip to the call, about 50 µs on
loopback (benchmarks/results/dataplane-rate-limits-2026-11-01). - The data plane gains a dependency, the
rediscrate. Quotas andmax_concurrentare still forwarded.
- Its 429s are Python's, body and headers alike. They count in
- The Rust data plane (experimental) serves keys with their own
query_timeoutandmax_rows. Before, it forwarded
every call such a key made. It applies them as Python does: the smaller of?timeout=, the server's limit and the
key's, and pages cut to the key'smax_rowsoncepage_sizeis within the server's. A 504 says the time limit as
Python does,5for a key's whole-number limit. The differential gate covers both, with a key'smax_rowschanged
partway through. - CI: the data plane's differential gate runs against real Redis. A rate-limited key, the server-wide limit (by
IPv4 and IPv6 address), one budget spent through both processes, a call forwarded after counting, and Redis cut
mid-sequence must each answer as Python alone does.
Changed
- The Docker image runs Python 3.13 from python-build-standalone, not the official
python:3.12-slimimage's 3.12
(ADR 0031). The official image compiles Python in a way that runs it 27-30% slower per CPU than other builds of it.
At the gateway that's 6-9% more calls a second when Python serves them. Behind the data plane, one Python worker
past its ceiling now records 60% more runs.- Python is upstream's 3.13 release, now 3.13.18, installed by
uvin a build stage.uvis pinned by
digest and checks the download's hash, and eachuvrelease resolves 3.13 to one exact patch release. Its
updates come from Dependabot, as the base images' do. - The image is
debian:trixie-slim, pinned by digest, with the packages in a virtualenv,/opt/venv, first
onPATH. - Python's own
sslnow uses the OpenSSL compiled into it (3.5.9), as psycopg2 and cryptography already use
their own. - The image carries no
pip. It never ran it, and the old copies of urllib3, msgpack and setuptools that
pipvendors were the image's only HIGH findings among its Python packages: Trivy now finds none there. If you
build an imageFROMthis one andpip installinto it, addUSER rootand
RUN python -m ensurepip --default-pipfirst (andUSER appafter). Running the image, with Docker, Compose or
the Helm chart, needs no change. - The image is 10.8 MB larger. The PyPI package is unchanged, and still supports Python 3.11-3.14.
- Python is upstream's 3.13 release, now 3.13.18, installed by
- CI: the upgrade fixtures from 0.47.0 are added, and the rolling-upgrade and Helm checks now start from 0.47.0.
- CI: signing the image and the chart retries up to three times. Rekor once answered cosign's own retried upload
with409 createLogEntryConflict, which failed 0.47.0's Docker publish until the job was rerun. - CI: a release, or a
docker.ymlrehearsal, checks that the arm64 image's Python runs under QEMU. A test checks
that everyCOPY --from=in the Dockerfile names one of its stages, so Dependabot sees each image the build uses. - CI: the Docker image job checks that the image has no
pip, and thatpython -m ensurepip --default-pip
brings one back. A test checks the Dockerfile installs withpipand uninstalls it in one step.
Fixed
- A NUL character in a string parameter was a 500 on PostgreSQL. PostgreSQL's text can't hold one and psycopg2
refuses to send it, so the call failed asquery_failed. It is now the caller's400 param_invalid, naming the
parameter, on saved queries, ad-hoc SQL and MCP tools alike; the other databases take the value as before. Found by
the data plane's differential test, which forwards such calls to Python. - An MCP tool that found no rows answered with REST's message, not an empty list. A saved query's tool returned
{"message": "No results returned"}asstructuredContent.rows, against its ownoutputSchema(an array): the
official MCP SDK's client raised an error for it, so an agent looking for something that isn't there got a failure
instead of[]. A key with a row quota was also charged one row for each such call. Nowrowsis[]. REST's
answer is unchanged. queryapigate initfailed whenQUERYAPIGATE_HOMEdidn't exist yet (unable to open database file): the
store was opened beforeinitmade the folder. It makes it first now, as it always meant to.queryapigate --helpcalledconfigexperimental, and so did the Helm chart's row in DEPLOYMENT.md:
configuration as code has been stable, under the compatibility promise, since 0.30.
Security
- Workspaces (experimental): two workspaces' keys of the same name shared one rate limit and one
max_concurrent.
A key's name is unique only within its workspace, but its rate-limit bucket and its concurrency slots were counted
under the name alone. With the same limit on both,team-b'spartnerkey could spendteam-a'spartner's
budget, soteam-a's calls were refused, and its usage showed in the other key'sX-RateLimit-Key-Remaining. Both
are now counted under the workspace and the name (<workspace>~<name>), in process and in Redis, as quotas already
were. Since 0.38.0, and only with workspaces. On upgrade, each key's rate-limit bucket starts full once. While a
rolling upgrade has old and new instances side by side, they count in different buckets, so a key can briefly make
up to twice its limit.