MySQL Proxy
1392
Opening the connection is relatively inexpensive, because there is no security, authentication or other
handshake taking place before you can start sending requests and getting results. Most APIs support
a persistent connection to a
memcached
instance to reduce the latency. Connection pooling would
depend on the API you are using, but if you are communicating directly over TCP/IP, then connection
pooling would provide some small performance benefit.
16.6.5.10: How is the data handled when the
memcached
server is down?
The behavior is entirely application dependent. Most applications fall back to loading the data from
the database (just as if they were updating the
memcached
information). If you are using multiple
memcached
servers, you might also remove a downed server from the list to prevent it from affecting
performance. Otherwise, the client will still attempt to communicate with the
memcached
server that
corresponds to the key you are trying to load.
16.6.5.11: How are auto-increment columns in the MySQL database coordinated across
multiple instances of memcached?
They aren't. There is no relationship between MySQL and
memcached
unless your application (or, if
you are using the MySQL UDFs for
memcached
, your database definition) creates one.
If you are storing information based on an auto-increment key into multiple instances of
memcached
,
the information is only stored on one of the
memcached
instances anyway. The client uses the key
value to determine which
memcached
instance to store the information. It doesn't store the same
information across all the instances, as that would be a waste of cache memory.
16.6.5.12: Is compression available?
Yes. Most of the client APIs support some sort of compression, and some even allow you to specify the
threshold at which a value is deemed appropriate for compression during storage.
16.6.5.13: Can we implement different types of
memcached
as different nodes in the same
server, so can there be deterministic and non-deterministic in the same server?
Yes. You can run multiple instances of
memcached
on a single server, and in your client configuration
you choose the list of servers you want to use.
16.6.5.14: What are best practices for testing an implementation, to ensure that it improves
performance, and to measure the impact of
memcached
configuration changes? And would you
recommend keeping the configuration very simple to start?
The best way to test the performance is to start up a
memcached
instance. First, modify your
application so that it stores the data just before the data is about to be used or displayed into
memcached
. Since the APIs handle the serialization of the data, it should just be a one-line
modification to your code. Then, modify the start of the process that would normally load that
information from MySQL with the code that requests the data from
memcached
. If the data cannot be
loaded from
memcached
, default to the MySQL process.
All of the changes required will probably amount to just a few lines of code. To get the best benefit,
make sure you cache entire objects (for example, all the components of a web page, blog post,
discussion thread, and so on), rather than using
memcached
as a simple cache of individual rows of
MySQL tables.
Keeping the configuration simple at the start, or even over the long term, is easy with
memcached
.
Once you have the basic structure up and running, often the only ongoing change is to add more
servers into the list of servers used by your applications. You don't need to manage the
memcached
servers, and there is no complex configuration; just add more servers to the list and let the client API
and the
memcached
servers make the decisions.
15.7. MySQL Proxy
The MySQL Proxy is an application that communicates over the network using the MySQL network
protocol and provides communication between one or more MySQL servers and one or more MySQL
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...