Wednesday, January 29, 2014

MaxScale for the rest of us - Part 1



MaxScale for the rest of us - Part 1

SkySQL released MaxScale as Open Source on github a few weeks ago. For some instructions on how to install and configure it, Ivan Zoratti has written a blog about that, and Mark Riddoch has written about why we need MaxScale here, but what I will try in a series of blogs is to describe what MaxScale is, in terms of what you can do with it, and to put it into context, so that you have an idea why you would want to install it in the first place. I will also show how to configure and manage MaxScale. This first post is a quick introduction to MaxScale.

So what is MaxScale then? Mark, and many others, call it a Proxy, and that is partly true, if you download MaxScale as it stands and start using it, it sure is a proxy, but that's underestimating the abilities of MaxScale a bit. The power of MaxScale largely lies in that is is extensible and in how effective the core of MaxScale is.
 There are 5 different types of plugins, with different properties. Some of these are always required, some are optional, but they all have some common properties:
  • The MaxScale core is written in C and the Plugin API is a C API. This doesn't mean a plugin is limited to C, but the interface to MaxScale is.
  • MaxScale is multi-threaded, so plugins need to be threadsafe. This is a good thing, not a restriction!
  • They depend on eachother, to a large extent.
  • The MaxScale core handles a lot of the basics and the routing between modules.
This means that there are a lot of things that MaxScale can do, all you need is to develop a module or two, right? Well, actually it's easier than that as there are some Modules that are already included with MaxScale.

Current MaxScale modules

The currently available modules are of two types, the ones used for development, debugging and monitoring of MaxScale and the ones that can be used for real database work.

Protocol modules

Protocol modules are key to MaxScale, these are the nodules that enable MaxScale to talk to just about anything. Currently the most important modes are the ones that implement the MySQL client and server protocol (yes, this is two separate modules). For testing and managing MaxScale there are also telnet and http protocol modules.

Authentication modules

These modules do authentication, but if you look at the current sourcecode, you realize there are no authentication modules. But authentication still takes place, as part of the MySQL protocol modules.

Monitor modules

These modules monitor the servers and keep MaxScale informed about the status of these, like which one is a master, which is running, which is a slave etc.. This information is then used by the routing modules to know to to route client traffic. There are 2 monitor modules available right now, one that monitors the master/slave status of servers and one that monitors the status of the nodes in a MariaDB Galera Cluster setup.

Filter modules

The purpose of this kind of plugin should be obvious. This module API is currently not yet implemented.

Router modules

This is the most interesting type of module, and this is where the logic of routing database traffic takes place. There are currently 3 router modules included with MaxScale, one that does read/write splitting on a cluster master/slave servers, using the monitor to keep track of which is master and slave, one that does simple load balancing and one that handles a MariaDB Galera Cluster.

MaxScale uses

As can be seen from above, MaxScale can be used for many thing potentially. What determines what it can be used for depends largely on what modules are available, potentially it can be used for protocol conversion, query filtering, high availability and load balancing, for example. As it stands with the currently available modules though, is the MySQL protocol and for query routing we can do a couple of different variations on load balancing and HA using Galera.

To be continued

The next post in this series of blogs on MaxScale will show an actual use-case and how we can solve a real-world problem using MaxScale.

/Karlsson

4 comments:

Shan Jonson said...

Are there accessible means to get money out of the account? ATMs are a abundant way to get fast banknote out of your coffer account. Acquisition a coffer which will action chargeless admission for these transactions. Accepting to pay to get admission to your own money may be acceptable at times, but it is not a acceptable convenance to be in. Fees are answerable by payday accommodation lenders for the use of third affair money. This makes added sense; your money should be accessed for free.
cash advance san-diego

jhon said...

From here, the aggregation automatically deducts a set allotment from the business's acclaim agenda sales for a set time period. The key actuality is that as the business grows, so does its adeptness to accord the beforehand in a beneath bulk of time.
Payday Loans

Shan Jonson said...

But there are acutely some disadvantages of that. There's additionally a 21st aeon adaptation of the Banknote Envelope arrangement alleged Basic Envelopes. We'll analyze how you can apparatus a Basic Envelope arrangement application your allotment worksheets.
cash advance

Shan Jonson said...

One accomplished advantageous money allotment address was to set up your extenuative and bill advantageous arrangement application banknote envelopes. Basically the banknote envelope arrangement consists of befitting abstracted envelopes for your spending categories and clearing them with banknote from your assets source. Again back a bill comes due or you allegation to go arcade for aliment or an annual you need, you artlessly pay for it with banknote from the adapted envelope.
cash advance loans in fresno