Copyright © tutorialspoint.com
The primary use of distcache right now is SSL/TLS session caching. This allows SSL/TLS servers (eg. a secure Apache web server providing HTTPS support) to use a centralised session cache, i.e any server may resume SSL/TLS sessions negotiated by any other server on the network. The advantages to this approach include increased freedom of mechanisms for load-balancing.
| Tag | Description |
|---|---|
| dc_server | Runs a cache server listening on a configurable network address. See dc_server(1). |
| dc_client | Runs a local client proxy. From the point of view of applications this behaves like dc_server, but manages multiplexing application requests to/from a cache server over a single persistent connection. See dc_client(1). |
| dc_test | Sends a (configurable) barrage of session caching requests to a given network address using the distcache protocol. Useful for testing correctness of an installation as well as benchmarking. Can be used directly against an instance of dc_server or against a dc_client proxy. See dc_test(1). |
| dc_snoop | A transparent proxy tool supporting the distcache protocol that can be used to monitor cache operation requests and responses between any two end-points (eg. between an application and dc_client, or between dc_client and dc_server). See dc_snoop(1). |
libnal defines various object types;
| Tag | Description |
|---|---|
| NAL_ADDRESS (see NAL_ADDRESS_new(2)) | The addressing abstraction converts to and from text representations, indicates whether given addresses are valid for listening on, connecting to, or both. |
| NAL_CONNECTION (see NAL_CONNECTION_new(2)) | This encapsulates a network connection that can be used for sending and receiving arbitrary binary data. |
| NAL_LISTENER (see NAL_LISTENER_new(2)) | This encapsulates a listening socket that can be used to accept incoming connection requests on a configured address, creating a NAL_CONNECTION wrapper for each accepted connection. |
| NAL_SELECTOR (see NAL_SELECTOR_new(2)) | This provides an object that can be prepared with various NAL_LISTENER and NAL_CONNECTION objects, and then can block waiting for network activity up to some configurable limit of time. This is the basis of non-blocking I/O and is an encapsulation of the traditional select(2) function. |
| NAL_BUFFER (see NAL_BUFFER_new(2)) | This abstraction implements a FIFO data array and is used primarily for representing the read and send parts of a NAL_CONNECTION object. |
| Tag | Description |
|---|---|
| distcache/dc_plug.h | This header provides the DC_PLUG abstraction. This encapsulates a connection and implements the distcache protocol and various functions for manipulating the reading and writing of distcache messages (requests or responses). This abstraction can support client and server implementations of the distcache protocol and supports asynchronous behaviour by interacting with libnals NAL_SELECTOR type. For more information, see DC_PLUG_new(2). |
| distcache/dc_client.h | This header declares a higher-level (and much simpler) API than dc_plug.h, and is useful in applications that want API functions that do cache operations. The API is blocking, and provides simplistic add, remove, and get functions that only return once the full request/response cycle is complete or an error has occured. This is the API used to add distcache support to applications like Apache, stunnel, etc. For more information, see DC_CTX_new(2). |
| Tag | Description |
|---|---|
| dc_server(1) | Distributed caching server. |
| dc_client(1) | Distributed caching client proxy |
| dc_snoop(1) | Distcache protocol analyser and debugging tool. |
| http://www.distcache.org/ | Distcache home page. |
Home Page: http://www.distcache.org
Copyright © tutorialspoint.com