Skip to content

v1.4.0

Choose a tag to compare

@github-actions github-actions released this 09 Mar 10:48
· 1 commit to main since this release

What's New

MongoDB Store

Atomic $inc + $setOnInsert upserts with TTL indexes for auto-cleanup. Works on both Node.js and Bun.

import { mongoStore } from '@joint-ops/hitlimit/stores/mongodb'
app.use(hitlimit({ store: mongoStore({ db }) }))

MySQL Store

Atomic INSERT ON DUPLICATE KEY UPDATE with scheduled cleanup. Works on both Node.js and Bun.

import { mysqlStore } from '@joint-ops/hitlimit/stores/mysql'
app.use(hitlimit({ store: mysqlStore({ pool }) }))

Benchmark Infrastructure

  • New interactive benchmark CLI replacing legacy shell scripts
  • Centralized benchmarks.json as single source of truth for all 50+ doc pages
  • 34 benchmark result files for v1.4.0 across all frameworks and stores
  • CI/CD workflows with MongoDB and MySQL service containers

Performance

  • Bun SQLite: Added PRAGMA journal_mode = WAL for parity with Node.js
  • MongoDB optimization: Replaced aggregation pipeline with direct upserts (~2x throughput)

Documentation

  • All doc pages now consume live benchmark data — no more hardcoded numbers
  • Overhauled READMEs with collapsible store sections and ASCII deployment diagrams
  • New store pages: /docs/stores/mongodb and /docs/stores/mysql
  • Benchmark page rewrite with runtime-tabbed UI

Key Numbers (Apple M1 Pro, 10K unique IPs)

Store Node.js Bun
Memory 4.08M ops/sec 5.57M ops/sec
SQLite 404K ops/sec 372K ops/sec
MongoDB 2.16K ops/sec 2.13K ops/sec

8 Storage Backends

hitlimit now supports Memory, SQLite, Redis, Valkey, DragonflyDB, PostgreSQL, MongoDB, and MySQL — all built in, no extra packages.

Contributors

Full Changelog: v1.3.0...v1.4.0