Keyforge is a high-performance, highly scalable, and fault-tolerant key-value store that can be used in:
-
Caching:
- Keeping frequently used data ready for fast access, like storing a copy of your favorite website for quicker loading.
-
Session Management:
- Saving user sessions, like when a website remembers you're logged in, even if you refresh the page.
-
Configuration Storage:
- Storing settings for applications that need to change based on the environment, like a game adapting its controls for different players.
-
Event Tracking:
- Keeping track of events in real-time systems, like logging actions in a multiplayer game.
-
Metadata Storage:
- Saving extra information about files or data, like descriptions of photos in a photo-sharing app.
And in a lot more usecases.
This project is part of the Golang (Go) for Production Systems course by tdevs.in. You can check out the project details at https://tdevs.in/golang_in_production.
- CPU: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz
- Go Version:
go1.23.4
- Operating System: Linux (amd64)
- Test Duration: 10 seconds per operation
- Concurrency: 512 parallelism for both
GetKey
andSetKey
Metric | Value |
---|---|
Iterations | 13,513,574 |
Time per Operation | 855.8 ns |
Throughput | ~1,168,252 req/sec |
Memory Usage | 192 B/op |
Allocations | 3 allocs/op |
Metric | Value |
---|---|
Iterations | 1,583,232 |
Time per Operation | 10,467 ns |
Throughput | ~95,508 req/sec |
Memory Usage | 391 B/op |
Allocations | 8 allocs/op |