You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move and rename various legacy proxy-doc files into /features/proxy.
Add weights and lead-in text to make them part of the current ToC and page flow.
Move from FAQ from the main legacy doc page to its own page.
Trim introductory content from the main legacy doc page that is now served by the new overview and quickstart pages.
Rename the legacy doc page as an API-specific overview and reference.
Copy file name to clipboardExpand all lines: content/features/proxy/api-reference.md
+5-157Lines changed: 5 additions & 157 deletions
Original file line number
Diff line number
Diff line change
@@ -1,64 +1,14 @@
1
1
+++
2
-
title = 'Proxy OldDocs'
2
+
title = 'Proxy API reference'
3
3
date = 2024-09-01T09:05:37-07:00
4
+
weight = 200
4
5
+++
5
6
6
-
## What is it?
7
+
This page provides a description of and reference to the Memcached built-in proxy API. These allow customization or replacement of the proxy's standard route library in advanced use cases.
7
8
8
-
A proxy speaking the memcached text and meta protocols designed for managing
9
-
clusters of memcached servers. It is fast, flexible, trivial to build and
10
-
deploy. Since it is built into memcached and scriptable using Lua (5.4), many
11
-
topologies, tricks, and deployment options are possible.
9
+
For a general overview of the built-in proxy, see [Built-in proxy]({{<proxy_base_path>}}).
12
10
13
-
Most existing memcached proxies reflect the architecture of the companies
14
-
which originally made them. With the internal proxy, the "route handlers" are
15
-
small Lua functions which pass requests into pools of servers. This allows it
16
-
to not only emulate most existing proxies, but adapt more closely to your own
17
-
architecture.
18
-
19
-
## Quick Start
20
-
21
-
Requires memcached version 1.6.23 or newer. If you run into trouble, you can
22
-
try the [next branch](https://github.com/memcached/memcached/tree/next) in
23
-
case a fix has already been found.
24
-
25
-
You can use Docker to try the latest code.
26
-
This image expects a "config.lua" to be in the directory
27
-
You will need to start backend memcached's on your own!
28
-
```sh
29
-
docker run -v /path/to/config/directory:/config:ro --publish 11211:11211 \
30
-
dormando/memcached:next-proxy
31
-
```
32
-
33
-
A configuration flag is necessary to enable the feature:
34
-
```sh
35
-
./configure --enable-proxy
36
-
make
37
-
make test
38
-
```
39
-
40
-
If building from the `next` git branch, you will need to run a script to grab
41
-
some vendored code:
42
-
```sh
43
-
cd vendor/
44
-
./fetch.sh
45
-
cd ..
46
-
./configure --enable-proxy
47
-
make
48
-
make test
49
-
```
50
-
51
-
Unless you want to write your route handlers from scratch, you need a route
52
-
library. We supply [a route library](https://github.com/memcached/memcached-proxylibs/tree/main/lib/routelib) for ease of use. Note that future releases should include this library directly, so you will not always need to download it separately.
53
-
54
-
Please see the [routelib README](https://github.com/memcached/memcached-proxylibs/blob/main/lib/routelib/README.md) for a quick start guide.
55
-
56
-
You can route commands to the specified pools by adding "foo/" or "bar/" to
57
-
the key, ie:
58
-
59
-
`get foo/a\r\n` or `get foo/someotherkey\r\n`
60
-
61
-
## Status
11
+
## Development status of the proxy API
62
12
63
13
At this stage API functions are mostly stable, but are still subject to
64
14
occasional change. Most changes in functionality will be either additions or
@@ -67,19 +17,6 @@ with a backwards-compatible deprecation cycle.
67
17
After 1.6.23, we do not expect major core changes to the API. We will stick to
68
18
incremental improvements.
69
19
70
-
## Protocol Commands
71
-
72
-
The following commands are relevant for controlling memcached proxy
73
-
74
-
-`stats proxy`: prints proxy-specific stats counters. Includes dynamically
75
-
created counters from the lua configuration.
76
-
77
-
-`watch proxyreqs|proxyevents|proxyuser`: watch commands for streaming logs
78
-
specific to the proxy.
79
-
80
-
- Sending a `SIGHUP` signal to memcached will cause the proxy to reload its
81
-
configuration. This does not interrupt active traffic.
82
-
83
20
## Features
84
21
85
22
* Supports most of the text and meta protocols
@@ -99,21 +36,6 @@ Roadmapped features:
99
36
* Expanded API for manipulating request data easily
100
37
* TLS support for backend connections (frontend TLS is already supported)
101
38
102
-
---
103
-
104
-
## Examples and use cases
105
-
106
-
See [this document on example architectures](/ProxyExamples) for
107
-
different methods of deploying and using the proxy.
108
-
109
-
---
110
-
111
-
## Architecture and Workflows
112
-
113
-
See [this document on architecture](/ProxyArch) for details on the proxy's
114
-
thread components and how various subsystems work.
Copy file name to clipboardExpand all lines: content/features/proxy/examples.md
+4-21Lines changed: 4 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,11 @@
1
1
+++
2
-
title = 'Usage Examples'
2
+
title = 'Usage examples'
3
3
date = 2024-09-01T09:08:32-07:00
4
+
weight = 50
4
5
+++
5
6
7
+
This page provides illustraed examples of ways that you can create load-balanced, multiple-node cacheing systems using the Memcached built-in proxy. For a general overview of the built-in proxy, see [Built-in proxy]({{<proxy_base_path>}}).
8
+
6
9
The memcached proxy is a flexible and lightweight system with few
7
10
dependencies. Any memcached binary can be a proxy, a cache server, or both.
8
11
This allows us to adjust easily based on application requirements.
@@ -188,8 +191,6 @@ with a local sidecar (high bandwidth) and some might use a centralized pool
188
191
Generally the overhead of local connections is low, but this must be verified
189
192
because "container systems" can add significant overhead.
190
193
191
-
---
192
-
193
194
## Cache Layering Proxy
194
195
195
196
```mermaid
@@ -238,21 +239,3 @@ memcached pool.
238
239
239
240
- Configuration of pools needs to be managed in two places (application
0 commit comments