| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
local res = mcp.internal(r) - takes a request object and executes it
against the proxy's internal cache instance.
Experimental as of this commit. Needs more test coverage and
benchmarking.
|
| |
|
|
|
|
|
|
| |
The header generated comes with $ IDs thus breaking the build.
The probes are set with const address arguments already
which just add the qualifier again.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this is ketama-based, with options for minor compat changes with major
libraries.
does _not_ support weights. The weights bits in the original ketama
broke the algorithm, as changing the number of points would shift
unrelated servers when the list changes.
this also changes backends to take a "name" specifically, instead of an
"ip address". Though note if supplying a hostname instead of an IP there
might be inline DNS lookups on reconnects.
|
|
|
|
|
|
|
|
|
| |
now's a good time to at least shove functional subsections of code into
their own files. Some further work to clearly separate the API's will
help but looks not too terrible.
Big bonus is getting the backend handling code away from the frontend
handling code, which should make it easier to follow.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See BUILD for compilation details.
See t/startfile.lua for configuration examples.
(see also https://github.com/memcached/memcached-proxylibs for
extensions, config libraries, more examples)
NOTE: io_uring mode is _not stable_, will crash.
As of this commit it is not recommended to run the proxy in production.
If you are interested please let us know, as we are actively stabilizing
for production use.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
needs more testing. in a "pure miss" test to help show hashing overhead,
with four worker threads and large ascii multigets there is a measurable
performance boost for longer keys. Very short keys (10-15 bytes) are
about even.
for 150ish byte keys 12m rps -> 13m rps roughly. Not too bad!
need to test hash table distribution for large sets of keys before
merging. need to consider if worth switching the defaults now or later.
|
|
|
|
|
| |
ie: ms [key] b
if 'k' flag is given and key is binary, returns as binary encoded.
|
|
|
|
|
|
| |
Use the .arch_extension directive so that a config options and
special cflags aren't required. Add a few tests for both the
software and hardware implementations
|
|
|
|
| |
also some missed text bits.
|
|
|
|
| |
export a lot of the connection handling code from memcached.c
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
allows specifying a megabyte limit for either response objects or read
buffers. this is split among all of the worker threads.
useful if connection limit is extremely high and you want to
aggressively close connections if something
happens and all connections become active at the same time.
missing runtime tuning.
|
| |
|
|
|
|
|
|
|
|
| |
* Remove bespoke testing system in favor of testapp.c
* Change stats_prefix_init function to take prefix delimiter.
Otherwise, we would have to include memcached.h in testapp.c to get
the settings struct, which in turn would cause a conflicting
definition of the conn struct.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"-e /path/to/tmpfsmnt/file"
SIGUSR1 for graceful stop
restart requires the same memory limit, slab sizes, and some other
infrequently changed details. Most other options and features can
change between restarts. Binary can be upgraded between restarts.
Restart does some fixup work on start for every item in cache. Can take
over a minute with more than a few hundred million items in cache.
Keep in mind when a cache is down it may be missing invalidations,
updates, and so on.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Loads "username:password\n" tokens (up to 8) out of a supplied authfile.
If enabled, disables binary protocol (though may be able to enable both
if sasl is also used?).
authentication is done via the "set" command. A separate handler is
used to avoid some hot path conditionals and narrow the code
executed in an unauthenticated state.
ie:
set foo 0 0 7\r\n
foo bar\r\n
returns "STORED" on success. Else returns CLIENT_ERROR with some
information.
Any key is accepted: if using a client that doesn't try to authenticate
when connecting to a pool of servers, the authentication set can be
tried with the same key as one that failed to coerce the client to
routing to the correct server. Else an "auth" or similar key would
always go to the same server.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the work done by Tharanga. Some commits squashed in by
dormando. Also reviewed by dormando.
Tested, working, but experimental implementation of TLS for memcached.
Enable with ./configure --enable-tls
Requires OpenSSL 1.1.0 or better.
See `memcached -h` output for usage.
|
| |
|
|
|
|
|
|
|
|
| |
couple TODO items left for a new issue I thought of. Also hardcoded memory
buffer size which should be fixed.
also need to change the "free and re-init" logic to use a boolean in case any
related option changes.
|
|
|
|
|
| |
./configure --enable-extstore to compile the feature in
specify -o ext_path=/whatever to start.
|
|
|
|
|
| |
been squashing reorganizing, and pulling code off to go upstream ahead
of merging the whole branch.
|
| |
|
|
|
|
|
| |
Order in the compilation matters. Some compilers will fail with
-lseccomp before the objects.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement an aggressive version of drop_privileges(). Additionally add
similar initialization function for threads drop_worker_privileges().
This version is similar to Solaris one and prohibits memcached from
making any not approved syscalls. Current list narrows down the allowed
calls to socket sends/recvs, accept, epoll handling, futex (and
dependencies - mmap), getrusage (for stats), and signal / exit
handling.
Any incorrect behaviour will result in EACCES returned. This should be
restricted further to KILL in the future (after more testing).
The feature is only tested for i386 and x86_64. It depends on bpf
filters and seccomp enabled in the kernel. It also requires libsecomp
for abstraction to seccomp filters. All are available since Linux 3.5.
Seccomp filtering can be enabled at compile time with --enable-seccomp.
In case of local customisations which require more rights, memcached
allows disabling drop_privileges() with "-o no_drop_privileges" at
startup.
Tests have to run with "-o relaxed_privileges", since they require
disk access after the tests complete. This adds a few allowed syscalls,
but does not disable the protection system completely.
|
|
|
|
|
|
|
|
| |
would prefer to pass/reuse make's -j down to prove, but don't want to spend
the time on it.
makes tests run in ~30s instead of several minutes. can use a fair amount of
RAM so be wary with automated builders.
|
|
|
|
| |
converts the python script to C, more or less.
|
|
|
|
| |
converted from C++. for best speed, needs to be built with O3
|
|
|
|
|
|
|
| |
~600 lines gone from items.c makes it a lot more manageable.
this change is almost purely moving code around and renaming functions. very
little logic has changed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Logs are written to per-thread buffers. A new background thread aggregates the
logs, further processes them, then writes them to any "watchers".
Logs can have the time added to them, and all have a GID so they can be put
back into strict order.
This is an early preview. Code needs refactoring and a more complete set of
options. All watchers are also stuck viewing the global feed of logs, even if
they asked for different data.
As of this commit there's no way to toggle the "stderr" watcher.
|
|
|
|
|
| |
jenkins hash is old. Lets try murmur3 to start! Default is the old one, so
people aren't surprised.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This solves the problem where certain test failures would cause
indefinite hangs as child processes refused to ever exit.
|
| |
|
|
|
|
| |
The suffix pool could be thread-local and use the generic cache
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will allow more specific version numbers, while simplifying a
proper release down to a tag and make dist.
During development, ./version.sh needs to run periodically to update
the version number. I'd recommend just adding a call to version.sh as
a git post commit hook:
% cat .git/hooks/post-commit
echo "Updating version."
./version.sh
(and make sure the file is executable)
|
|
|
|
| |
see http://code.google.com/p/memcached/issues/detail?id=37
|
| |
|
| |
|
| |
|
|
|
|
| |
subversion anymore). Added generated files to .gitignore
|