datasette-ip-rate-limit 0.1a0

· Source: Simon Willison's Weblog · Field: Technology & Digital — Software Development & Engineering, Artificial Intelligence & Machine Learning, Cybersecurity & Data Privacy · Depth: Intermediate, quick

Summary

The datasette-ip-rate-limit 0.1a0 plugin was released on May 14, 2026, to address issues with poorly-behaved crawlers overwhelming the datasette.io site. Developed using Codex (GPT-5.5 xhigh), this configurable plugin enables rate limiting of Datasette requests based on client IP addresses. Its production configuration, demonstrated on datasette.io, includes parameters such as a "Fly-Client-IP" header, a maximum of 10,000 keys, and exemptions for paths like "/static/*" and "/-/turnstile*". Specific rules can be defined, such as limiting requests to "/global-power-plants/*" and "/legislators/*" to 60 requests within a 60-second window, with a 20-second block duration upon exceeding the limit.

Key takeaway

For site administrators experiencing crawler-induced load issues on Datasette instances, implementing datasette-ip-rate-limit 0.1a0 offers a direct solution. You should review your site's traffic patterns to identify vulnerable paths and configure specific rate-limiting rules, including appropriate `window_seconds` and `max_requests` values, to mitigate abuse without impacting legitimate users.

Key insights

A new Datasette plugin rate limits requests by IP address, configurable to protect specific site areas.

Principles

Method

The plugin identifies client IPs via a specified header, applies rules based on paths, and blocks IPs exceeding defined request limits within a time window.

In practice

Topics

Code references

Best for: CTO, VP of Engineering/Data, Software Engineer, DevOps Engineer, AI Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Simon Willison's Weblog.