A fast and simple key/value store written in Go using only the standard library, balanced for both reads and writes.
Pudge is a fast and simple key/value store written in Go using only the standard library. It provides efficient, concurrent data storage with a minimal API, solving the need for a lightweight embedded database without external dependencies. It balances read and write performance, making it suitable for various application scenarios.
Go developers needing a lightweight, embedded key/value store for applications like simple social networks, high-load systems, or as a storage engine for custom databases.
Developers choose Pudge for its simplicity, performance, and concurrency safety, all within a tiny codebase that avoids complex internals like LSM trees or mmap, ensuring predictable behavior and ease of integration.
Fast and simple key/value store written using Go's standard library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks show Get operations reaching up to 666k ops/sec, comparable to hash tables, making it efficient for read-heavy workloads.
Designed for goroutine safety without manual file state management, enabling stress-free use in concurrent Go applications as demonstrated in web server examples.
Uses an in-memory hashmap only for keys while writing values to files, keeping memory usage low as confirmed in benchmarks with file sizes around 358MB for 1M keys.
With less than 500 lines of code and no hidden tasks like compaction, it offers a straightforward API and reliable behavior, reducing debugging overhead.
Operations are isolated but lack batching or automatic rollback, limiting use in scenarios requiring atomic multi-step updates.
The Keys function for ordered queries can be slow, varying from 10ms to 1 second per million keys due to lazy ordering, as admitted in the README.
Deleted data isn't physically removed; shrinking the database requires a manual backup and restore process, which can be cumbersome for dynamic datasets.