modulepackage
0.0.0-20161017035522-fbbe10924f6f
Repository: https://github.com/skipor/memcached.git
Documentation: pkg.go.dev
# README
memcached
###Usage
go get github.com/Skipor/memcached/cmd/memcached
memcached --help
for all options
memcached
to start server on default port
memcached -aof-name ./memcached.aof
to start server with AOF persistence on
memcached -aof-name ./memcached.aof -sync 2s
sync log not on every command, but every passed period
Features
- No third party packages for app, server and cache logic.
- That was tack constraint.
- I have used only small github.com/facebookgo/stackerr package for errors with stack traces.
- Parallel reads, serialized writes.
- Items data sync.Pool recycle.
- Low allocation text protocol parse.
- AOF persistence with configurable sync options.
- Every command can be synced, or sync can be done by ticker.
- Low latency fast log rotation.
- When log grows large, background goroutine takes fast snapshot under read lock.
- Snapshot is writen without log lock.
- Many unit and integration tests.
TODO
- LRU crawler
- goroutine waking up on ticker; take RLock; start goroutine per queue; find expired; save them; take write lock and remove them.
- Refactor integration load tester. Do more load tests and comparation with original memcached.
- Test CLI helper functions
- RDB persistence
- point-in-time snapshots of your dataset at specified intervals
- current version already use snapshots to archive large AOF, so it is easy to implement such feature
- Profiling with pprof and optimisation
- Snapshot consistency check
- Now check happen only in build with debug tag
- Optional
- replace state snapshot usage as AOF rotation
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Implementation specific consts.
No description provided by the author
128 MB.
No description provided by the author
30 days.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SnapshotCommand indicate that there is cache snapshot after it.
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
connMeta is data shared between connections.
No description provided by the author
Server serves memcached text protocol over tcp.