Quantcast
Channel: Severalnines - ClusterControl
Viewing all 203 articles
Browse latest View live

Please take part in our open source database management survey

$
0
0

As members of the open source database users community, it’d be great if you could participate in our open source database deployment and management survey.

Your feedback will help us make our resources and tools for deploying, monitoring, managing and scaling databases of even better use to all. It will give us valuable insight into the challenges you face when operating databases.

Please fill out our survey today by providing your input below; this will take approx. 5 minutes of your time.

We’ll share the results of the survey once we have compiled your responses.

Thank you!


ClusterControl new features webinar on May 24th

$
0
0

Join us for this new webinar on Tuesday, May 24th, where we’ll be discussing and demonstrating the latest version of ClusterControl, the one-stop console for your entire database infrastructure. We’ll be introducing some cool new features for MySQL and MongoDB users in particular as well as walk you through the work we’ve recently done for improved security.

Our colleagues Johan Andersson (CTO), Vinay Joosery (CEO) and Ashraf Sharif (System Support Engineer) will be demonstrating how you can deploy, monitor, manage and scale your databases on the technology stack of your choice with ClusterControl.

Date, Time & Registration

Europe/MEA/APAC

Tuesday, May 24th at 09:00 BST / 10:00 CEST (Germany, France, Sweden)
Register Now

North America/LatAm

Tuesday, May 24th at 09:00 Pacific Time (US) / 12:00 Eastern Time (US)
Register Now

Agenda

  • ClusterControl overview
  • New features deep-dive
    • For MySQL-based systems
    • For MongoDB-bases systems
    • Improved security
    • And more…
  • Live Demo
  • Q&A

Speakers

Johan Andersson is CTO at Severalnines, a company that enables developers to easily deploy, manage, monitor and scale highly-available MySQL clusters in the data center, in hosted environments and on the cloud. Prior to Severalnines, Johan worked at MySQL/Sun/Oracle and was the Principal Consultant and lead of the MySQL Clustering and High Availability consulting group, where he designed and implemented large-scale MySQL systems at key customers.

Vinay Joosery is a passionate advocate and builder of concepts and businesses around Big Data computing infrastructures. Prior to co-founding Severalnines, Vinay held the post of Vice-President EMEA at Pentaho Corporation - the Open Source BI leader. He has also held senior management roles at MySQL / Sun Microsystems / Oracle, where he headed the Global MySQL Telecoms Unit, and built the business around MySQL's High Availability and Clustering product lines. Prior to that, Vinay served as Director of Sales & Marketing at Ericsson Alzato, an Ericsson-owned venture focused on large scale real-time databases.

Ashraf Sharif is a System Support Engineer at Severalnines. He was previously worked as principal consultant and head of support team and delivered clustering solutions for big websites in the South East Asia region. His professional interests focus on system scalability and high availability.

 

We look forward to “seeing” you there and some good discussions!

ClusterControl Tips & Tricks: MySQL Query Performance Tuning

$
0
0

Bad query performance is the most common problem DBA’s have to deal with. There are numerous ways to collect, process and analyze the data related to query performance - we’ve covered one of the most popular tools, pt-query-digest, in some of our previous blog posts:

Become a MySQL DBA blog series

When you use ClusterControl though, this is not always needed. You can use the data available in ClusterControl to solve your problem. In this blog post, we’ll look into how ClusterControl can help you solve problems related to query performance.

It may happen that a query cannot complete in a timely manner. The query may be stuck due to some locking issues, it may be not optimal or not indexed properly or it may be too heavy to complete in a reasonable amount of time. Keep in mind that a couple of not indexed joins can easily scan billions of rows if you have a large production database. Whatever happened, the query is probably using some of the resources - be it CPU or I/O for a non-optimized query or even just row locks. Those resources are required also for other queries and it may seriously slows things down. One of very simple yet important tasks would be to pinpoint the offending query and stop it.

It is pretty easily done from the ClusterControl interface. Go to the Query Monitor tab -> Running Queries section - you should see an output similar to the screenshot below.

As you can see, we have a pile of queries stuck. Usually the offending query is the one which takes the long time, you might want to kill it. You may also want to investigate it further to make sure you pick the correct one. In our case, we clearly see a SELECT … FOR UPDATE which joins a couple of tables and which is in the ‘Sending data’ state meaning it is processing the data, for last 90 seconds.

Another type of question a DBA may need to answer is - which queries take most time to execute? This is a common question, as such queries may be a low hanging fruit - they may be optimizable, and the more execution time a given query is responsible for in a whole query mix, the larger is the gain from its optimization. It is a simple equation - if a query is responsible for 50% of total execution time, making it 10x faster will give much better result than optimizing a  query which is responsible for just 1% of the total execution time.

ClusterControl can help you answer such questions, but first we need to ensure the Query Monitor is enabled. You can check it in Settings -> Query Monitor Settings, making sure that the Query Sample Time is set to something else than -1.

The Query Monitor in ClusterControl works in two modes, depending on whether you have the Performance Schema available with the required data on the running queries or not. If it is available (and this is true by default in MySQL 5.6 and newer), Performance Schema will be used to collect query data, minimizing the impact on the system. Otherwise, the slow query log will be used and all of the settings visible in the above screenshot are used. Those are pretty well explained in the UI, so there’s no need to do it here. When the Query Monitor uses Performance Schema, those settings are not used (except for Query Sample Time which can be set to -1 to disable data collection).

When you confirmed that the Query Monitor is enabled in ClusterControl, you can go to Query Monitor -> Top Queries, where you’ll be presented with a screen similar to the below:

What you can see here is a list of the most expensive queries (in terms of execution time) that hit our cluster. Each of them has some further details - how many times it was executed, how many rows were examined or sent to the client, how execution time varied, how much time the cluster spent on executing a given type of query. Queries are grouped by query type and schema.

You may be surprised to find out that the main place where execution time is spent is a ‘COMMIT’ query. Actually, this is fairly typical for quick OLTP queries executed on Galera cluster. Committing a transaction is an expensive process because certification has to happen. This leads to COMMIT being one of the most time-consuming queries in the query mix.

When you click on a query, you can see an EXPLAIN output for it - pretty useful to identify if something’s wrong with it. In our example we’ve checked a SELECT … FOR UPDATE with high number of rows examined. As expected, this query is an example of terrible SQL - a JOIN which does not use any index. You can see on the EXPLAIN output that no index is used, not a single one was even considered possible to use. No wonder this query seriously impacted the performance of our cluster.

Another way to get some insight into query performance is to look at Query Monitor -> Query Histogram. This basically is a list of queries whose performance significantly differ from their average.

As you can see in the above screenshot, the first query took 0.0246s (time is shown in microseconds) where average execution time for that query is much lower (0.0008s). We have also some additional statistical info on standard deviation and maximum query execution time. Such list of queries may seem to be not very useful - it’s not really true. When you see a query on this list, it means that something was different from the usual - query did not complete in regular time. It may be an indication of some performance issues on your system and a signal that you should investigate other metrics, and check if anything else happened at that time.

People tend to focus on achieving max performance, forgetting that it is not enough to have high throughput - it also has to be consistent. Users like performance to be stable - you may be able to squeeze more transactions per second from your system but if it means that some transactions will start to stall for seconds, that’s not worth it. Looking at the Query Histogram in ClusterControl helps you identify such consistency issues in your query mix.

Happy query monitoring!

PS.: To get started with ClusterControl, click here!

Join Us On May 24th: ClusterControl New Features Webinar

$
0
0

We’re excited to be presenting the latest version of ClusterControl, the one-stop console for your entire database infrastructure, during our next live webinar on May 24th. We’ll be introducing some cool new features for MySQL and MongoDB users in particular as well as walk you through the work we’ve recently done for improved security.

Date, Time & Registration

Europe/MEA/APAC

Tuesday, May 24th at 09:00 BST / 10:00 CEST (Germany, France, Sweden)
Register Now

North America/LatAm

Tuesday, May 24th at 09:00 Pacific Time (US) / 12:00 Eastern Time (US)
Register Now

Our colleagues Johan Andersson (CTO), Vinay Joosery (CEO) and Ashraf Sharif (System Support Engineer) will be demonstrating how you can deploy, monitor, manage and scale your databases on the technology stack of your choice with ClusterControl.

Agenda

  • ClusterControl overview
  • New features deep-dive
    • For MySQL-based systems
    • For MongoDB-bases systems
    • Improved security
    • And more…
  • Live Demo
  • Q&A

Speakers

Johan Andersson is CTO at Severalnines, a company that enables developers to easily deploy, manage, monitor and scale highly-available MySQL clusters in the data center, in hosted environments and on the cloud. Prior to Severalnines, Johan worked at MySQL/Sun/Oracle and was the Principal Consultant and lead of the MySQL Clustering and High Availability consulting group, where he designed and implemented large-scale MySQL systems at key customers.

Vinay Joosery is a passionate advocate and builder of concepts and businesses around Big Data computing infrastructures. Prior to co-founding Severalnines, Vinay held the post of Vice-President EMEA at Pentaho Corporation - the Open Source BI leader. He has also held senior management roles at MySQL / Sun Microsystems / Oracle, where he headed the Global MySQL Telecoms Unit, and built the business around MySQL's High Availability and Clustering product lines. Prior to that, Vinay served as Director of Sales & Marketing at Ericsson Alzato, an Ericsson-owned venture focused on large scale real-time databases.

Ashraf Sharif is a System Support Engineer at Severalnines. He was previously worked as principal consultant and head of support team and delivered clustering solutions for big websites in the South East Asia region. His professional interests focus on system scalability and high availability.

 

We look forward to “seeing” you there and some good discussions!

ClusterControl 1.3 Released with New Features for MySQL, Percona Server, MariaDB, MongoDB & PostgreSQL

$
0
0

The Severalnines team is pleased to announce the release of ClusterControl 1.3.

This release contains key new features, such as Key Management for MySQL, MariaDB, Percona Server and PostgreSQL, improved security, additional Operational Reports, along with performance improvements and bug fixes.

Join us next week on Tuesday, May 24th, for a live demo!

Sign up for the webinar

Highlights

  • New for MySQL, MariaDB, Percona Server & PostgreSQL
    • Key Management
    • Additional Operational Reports
    • Improved Security
    • Create/Mirror Repository
  • New for MySQL
    • Deploy Production Setup of NDB/MySQL Cluster
  • New for MongoDB
    • Deploy Percona for MongoDB ReplicaSet Node

For additional details about the release:

Key Management: This new feature allows you to manage a set of SSL certificates and keys that can be provisioned on your clusters. Users can now create certificate authority certificates or self-signed certificates and keys, as well as easily enable and disable SSL encrypted client-server connections for MySQL and Postgres based clusters.

Additional Operational Reports for MySQL, MariaDB, Percona, MongoDB & PostgreSQL: In addition to the Operational Reports introduced in 1.2.12, users can now generate an Availability Summary of uptime/downtime for their managed clusters and see node availability and cluster state history during the reported period. It is also possible to generate a backup summary of backup success/failure rates for your managed clusters.

Improved security: We are now enforcing a unique Controller RPC API Token, which enables token authentication for your managed clusters. No user intervention is needed when upgrading older ClusterControl versions. An unique token will be automatically generated, set and enabled for existing clusters. See the ChangeLog for more details.

Create/Mirror Repository: Mirror your database vendor’s software repository without having to actually deploy a cluster. A mirrored local repository is used in scenarios where you cannot upgrade a cluster and must lock the db versions to use.

Deploy Production Setup of NDB/MySQL Cluster: Users can now create a production setup of NDB/MySQL Cluster from ClusterControl and deploy management, SQL/API and data nodes.

Deploy MongoDB ReplicaSet Node: Support for Percona MongoDB 3.x. Please also note that as of this version of ClusterControl, MongoDb 2.x is no longer supported.

There is a bunch of other features and improvements that we have not mentioned here. You can find all details in the ChangeLog.

We encourage you to test this latest release and provide us with your feedback. If you’d like a demo, feel free to request one.

With over 8,000 users to date, ClusterControl is the leading, platform independent automation and management solution for MySQL, MariaDB, Percona, MongoDB and PostgreSQL.

Thank you for your ongoing support, and happy clustering!

For additional tips & tricks, follow our blog: http://www.severalnines.com/blog/

Become a ClusterControl DBA: Operational Reports for MySQL and MariaDB

$
0
0

The majority of DBA’s perform health checks every now and then. Usually, it would happen on a daily or weekly basis. We previously discussed why such checks are important and what they should include.

To make sure your systems are in a good shape, you’d need to go through quite a lot of information - host statistics, MySQL statistics, state of backups, logs and so forth. Such data should be available in every properly monitored environment, although sometimes it is scattered across multiple locations - you may have one tool to monitor MySQL state, another tool to collect system statistics, maybe a set of scripts, e.g., to check the state of your backups. This makes health checks much more time-consuming than they should be - the DBA has to put together the different pieces to understand the state of the system.

Integrated tools like ClusterControl have an advantage that all of the bits are located in the same place (or in the same application). It still does not mean they are located next to each other - they may be located in different sections of the UI and a DBA may have to spend some time clicking through the UI to reach all the interesting data. This is why we introduced operational reports in ClusterControl 1.3 - which you can discover live next Tuesday during our release webinar.

The whole idea behind creating Operational Reports is to put all of the most important data into a single document, which can be quickly reviewed to get an understanding of the state of the databases.

See the Operational Reports live in action during our release webinar

Operational Reports are available from the menu Settings -> Operational Reports.

Once you go there, you’ll be presented with a list of reports created manually or automatically, based on a pre-defined schedule.

If you want to create a new report manually, you’ll use the ‘Create’ option. Pick the cluster, type of report, email recipients, and you’re pretty much done.

The reports can also be scheduled to be created on a regular basis.

At this time, three types of  reports are available  and we’ll show examples of these below.

Availability report

Availability reports focuses on, well, availability. It includes three sections. First, availability summary.

You can see information about availability statistics of your databases, the cluster type, total uptime and downtime, current state of the cluster and when that state last changed.

Another section gives more details on availability.

We can see when a node switched state and what the transition was. It’s a nice place to check if there were any recent problems with the cluster.

Similar data is shown in the third section of this report, where you can go through the history of changes in cluster state.

Backup report

The second type of the report is one covering backups.

It contains two sections and basically gives you a short summary of when the last backup was created, if it completed successfully or failed? You can also check the list of backups executed on the cluster with their state, type and size. This is as close you can get to be certain that backups work correctly without running a full recovery test. We definitely recommend that such tests are performed every now and then.

Default cluster report

This type of report contains detailed information about a particular cluster. It starts with a summary of different alerts which are related to the cluster.

Next section is about the state of the nodes that are part of the cluster.

You have a list of the nodes in the cluster, their type, role (master or slave), status of the node, uptime and the OS.

Another section of the report is the backup summary, same as we discussed above. Next one presents a summary of top queries in the cluster.

Finally, we see a “Node status overview” in which you’ll be presented with graphs related to OS and MySQL metrics for each node.

As you can see, we have here graphs covering all of the aspects of the load on the host - CPU, memory, network, disk, CPU load and disk free. This is enough to get an idea whether anything weird happened recently or not. You can also see some details about MySQL workload - how many queries were executed, which type of query, how the data was accessed (via which handler)? This, on the other hand, should be enough to pick most of the issues on MySQL side. What you want to look at are all spikes and dips that you haven’t seen in the past. Maybe a new query has been added to the mix and, as a result, handler_read_rnd_next skyrocketed? Maybe there was an increase of CPU load and a high number of connections might point to increased load on MySQL, but also to some kind of contention. An unexpected pattern might be good to investigate, so you know what is going on.

See the Operational Reports live in action during our release webinar

This is the first release of this feature, we’ll be working on it to make it more flexible and even more useful. We’d love to hear your feedback on what you’d like to have included in the report, what’s missing and what is not needed.

Watch the replay: ClusterControl 1.3 webinar with new features for MySQL, MariaDB, Percona Server, PostgreSQL and more!

$
0
0

Thanks to everyone who joined us yesterday for our ClusterControl 1.3 release webinar!

Johan Andersson, CTO at Severalnines and creator of ClusterControl, walked us through the latest features of the 1.3 release and demonstrated them live as well. In addition to an overview of ClusterControl’s deployment, monitoring, management and scaling functionalities for MySQL, MariaDB, Percona Server, MongoDB and PostgreSQL, Johan focussed our attention on new features around key management, operational reports and more.

One feature-set that triggered particular interest in yesterday’s audience was the automated deployment of a production setup of NDB / MySQL Cluster: users can create a production setup of NDB/MySQL Cluster from ClusterControl and deploy management, SQL/API and data nodes - all via the ClusterControl interface.

The replay of this webinar and the slides are now available for viewing online:

Sign up for the the replayRead the slides

To get started with ClusterControl, download it today.

Webinar Agenda

  • ClusterControl overview
  • New features deep-dive
    • Key management and encryption
    • Additional operational reports
    • Improved security
    • Create / mirror repository
    • Create NDB / MySQL Cluster
  • Live Demo
  • Q&A

Speaker

Johan Andersson, CTO, Severalnines - Johan's technical background and interest are in high performance computing as demonstrated by the work he did on main-memory clustered databases at Ericsson as well as his research on parallel Java Virtual Machines at Trinity College Dublin in Ireland. Prior to co-founding Severalnines, Johan was Principal Consultant and lead of the MySQL Clustering & High Availability consulting group at MySQL / Sun Microsystems / Oracle, where he designed and implemented large-scale MySQL systems for key customers. Johan is a regular speaker at MySQL User Conferences as well as other high profile community gatherings with popular talks and tutorials around architecting and tuning MySQL Clusters.

For more information on ClusterControl 1.3:

To get started with ClusterControl, download it today.

Become a ClusterControl DBA - SSL Key Management and Encryption of MySQL Data in Transit

$
0
0

Databases usually work in a secure environment. It may be a datacenter with a dedicated VLAN for database traffic. It may be a VPC in EC2. If your network spreads across multiple datacenters in different regions, you’d usually use some kind of Virtual Private Network or SSH tunneling to connect these locations in a secure manner. With data privacy and security being hot topics these days, you might feel better with an additional layer of security.

MySQL supports SSL as a means to encrypt traffic both between MySQL servers (replication) and between MySQL servers and clients. If you use Galera cluster, similar features are available - both intra-cluster communication and connections with clients can be encrypted using SSL.

A common way of implementing SSL encryption is to use self-signed certificates. Most of the time, it is not necessary to purchase an SSL certificate issued by the Certificate Authority. Anybody who’s been through the process of generating a self-signed certificate will probably agree that it is not the most straightforward process - most of the time, you end up searching through the internet to find howto’s and instructions on how to do this. This is especially true if you are a DBA and only go through this process every few months or even years. This is why we recently added a new ClusterControl feature designed to help you manage SSL keys across your database cluster. We based this blog post on ClusterControl 1.3.1.

Key Management in the ClusterControl

You can enter Key Management by going to Settings->Key Management section.

You will be presented with the following screen:

You can see two certificates generated, one being a CA and the other one a regular certificate. To generate more certificates, switch to the ‘Generate Key’ tab:

A certificate can be generated in two ways - you can first create a self-signed CA and then use it to sign a certificate. Or you can go directly to the ‘Client/Server Certificates and Key’ tab and create a certificate. The required CA will be created for you in the background. Last but not least, you can import an existing certificate (for example a certificate you bought from one of many companies which sell SSL certificates).

To do that, you should upload your certificate, key and CA to your ClusterControl node and store them in /var/lib/cmon/ca directory. Then you fill in the paths to those files and the certificate will be imported.

If you decided to generate a CA or generate a new certificate, there’s another form to fill - you need to pass details about your organization, common name, email, pick the key length and expiration date.

Once you have everything in place, you can start using your new certificates. ClusterControl currently supports deployment of SSL encryption between clients and MySQL databases and SSL encryption of intra-cluster traffic in Galera Cluster. We plan to extend the variety of supported deployments in future releases of the ClusterControl.

Full SSL encryption for Galera Cluster

Now let’s assume we have our SSL keys ready and we have a Galera Cluster, which needs SSL encryption, deployed through our ClusterControl instance. We can easily secure it in two steps.

First - encrypt Galera traffic using SSL. From your cluster view, one of the cluster actions is  Enable Galera SSL Encryption. You’ll be presented with the following options:

If you do not have a certificate, you can generate it here. But if you already generated or imported an SSL certificate, you should be able to see it in the list and use it to encrypt Galera replication traffic. Please keep in mind that this operation requires a cluster restart - all nodes will have to stop at the same time, apply config changes and then restart. Before you proceed here, make sure you are prepared for some downtime while the cluster restarts.

Once intra-cluster traffic has been secured, we want to cover client - server connections. To do that, pick ‘Enable SSL Encryption’ job and you’ll see following dialog:

It’s pretty similar - you can either pick an existing certificate or generate new one. The main difference is that to apply client - server encryption, downtime is not required - a rolling restart will suffice.

Of course, enabling SSL on the database is not enough - you have to copy certificates to clients which are supposed to use SSL to connect to the database. All certificates can be found in /var/lib/cmon/ca directory on the ClusterControl node. You also have to remember to change grants for users and make sure you’ve added REQUIRE SSL to them if you want to enforce only secure connections.

We hope you’ll find those options easy to use and help you secure your MySQL environment. If you have any questions or suggestions regarding this feature, we’d love to hear from you.


Press Release: Severalnines kicks off online European football streaming

$
0
0

Award-winning database management platform scores deal with continent’s largest online video solutions provider

Stockholm, Sweden and anywhere else in the world - 28/06/2016 - Severalnines, Europe’s leading database performance management provider, today announced its latest customer, StreamAMG (Advanced Media Group), a UK-based pioneer in the field of bespoke online video streaming and content management. StreamAMG is Europe’s largest player in online video solutions, helping football teams such as Liverpool FC, Aston Villa, Sunderland AFC and the BBC keep fans watching from across the world.

Long hailed as the future of online content, analysts predict that 90% of all consumer internet traffic will be video by 2019. This poses a challenge to streaming providers, both in terms of the amount of online video data to handle and the variety of ways the content is consumed. Customers expect a seamless viewing experience across any device on any operating system. Downtime, lag or disturbances to streaming can have serious repercussions for customer loyalty. Streaming providers should provide a secure and reliable media platform to maintain the interest of fans and attract new viewers, casting database performance in a starring role.

Founded in 2001, StreamAMG builds bespoke solutions for its customers to host and manage online video content. Its software delivers the high-availability needed for on-demand streaming or live broadcasting on any device. Loss of customer trust and damage to brand reputation are likely consequences of database failures, especially for those companies which operate in the online sports, betting and gaming industries.

Growing at 30% year on year required StreamAMG to have a scalable IT system to meet new customer demands and to maintain its leadership position in the market. StreamAMG reviewed its database performance as part of its IT infrastructure renewal project for to encompass new online channels, such as social media, and embedding marketing analytics to help its customers better understand and react to customer behaviour. It needed a solution to monitor and optimise its database management system and the detailed metrics to predict database failures.

After reviewing options provided by Oracle and AWS, amongst others, StreamAMG chose Severalnines to help future-proof its databases. The previous environment, based on a master-slave replication topology, was replaced with a multi-master Galera Cluster; and Severalnines’ ClusterControl platform was applied to automate operational tasks and provide visibility of uptime and performance through monitoring capabilities.

Thom Holliday, Marketing Manager StreamAMG, said: “With ClusterControl in place, StreamAMG’s flagship product is now backed with a fully automated database infrastructure which allows us to ensure excellent uptime. Severalnines increased our streaming speed by 76% and this has greatly improved the delivery of content to our customers. The implementation took only two months to complete and saved us 12% in costs. Expanding the current use of ClusterControl is definitely in the pipeline and we would love to work with Severalnines to develop new features.”

Vinay Joosery, Severalnines Founder and CEO, said: “Online video streaming is growing exponentially, and audiences expect quality, relevant content and viewing experiences tailor-made for each digital platform. I’m a big football fan myself and like to stay up to date with games whenever I can. Right now I’m following the European Championships and online streaming is key so I can watch the matches wherever I am. New types of viewerships place certain requirements on modern streaming platforms to create experiences that align with consumer expectations. StreamAMG is leading the way there, and helps its customers monetise online channels through a solidly architected video platform. We’re happy to be part of this.“

About Severalnines

Severalnines provides automation and management software for database clusters. We help companies deploy their databases in any environment, and manage all operational aspects to achieve high-scale availability.

Severalnines' products are used by developers and administrators of all skills levels to provide the full 'deploy, manage, monitor, scale' database cycle, thus freeing them from the complexity and learning curves that are typically associated with highly available database clusters. The company has enabled over 8,000 deployments to date via its popular online database configurator. Currently counting BT, Orange, Cisco, CNRS, Technicolour, AVG, Ping Identity and Paytrail as customers. Severalnines is a private company headquartered in Stockholm, Sweden with offices in Singapore and Tokyo, Japan. To see who is using Severalnines today visit: http://www.severalnines.com/customers

About StreamAMG

StreamAMG helps businesses manage their online video solutions, such as Hosting video, integrating platforms, monetizing content and delivering live events. Since 2001, it has enabled clients across Europe to communicate through webcasting by building online video solutions to meet their goals.

For more information visit: https://www.streamamg.com

Media Contact

Positive Marketing
Steven de Waal / Camilla Nilsson
severalnines@positivemarketing.com
0203 637 0647/0645

Become a PostgreSQL DBA - How to Setup Streaming Replication for High Availability

$
0
0

In the previous post in the series, we discussed the deployment of a single PostgreSQL instance. One might argue that this is not a production-grade setup - there is no high availability. In this post, we’ll show you how to set up streaming replication.

Master - slave replication

PostgreSQL historically did not have support for replication - replication was provided using external tools like Pgpool and Slony. Since these solutions did not come out of the box, most of them required quite some work to set them up. This was a serious drawback, and it made people look into MySQL, where replication has been available for a long time.

Starting with PostgreSQL 9.0, replication has been added natively to PostgreSQL - streaming of WAL has been chosen as a method to move data between master and slave. Let’s take a look at how you can add a slave to the standalone PostgreSQL master.

You will need to have two hosts with PostgreSQL. In our case, the master will have IP of 10.0.0.101 and our slave-to-be will have IP of 10.0.0.102. Let’s assume 10.0.0.101 has PostgreSQL up and running. We also have an instance running on 10.0.0.102, and we will stop the service to add it as a slave.

First - grants. We need to create a user that we will use for the replication. On the master, we’ll run:

postgres=# CREATE ROLE repl WITH REPLICATION PASSWORD 'password' LOGIN;
CREATE ROLE

Next, we need to add the following entry to pg_hba.conf file on the master and reload PostgreSQL:

host  replication  repl              10.0.0.102/32  md5

service postgresql reload

We can also add a similar entry to our slave’s pg_hba.conf - it may come in handy in the future if we promote it to a master:

host  replication  repl              10.0.0.101/32  md5

Next, we need to make a couple of changes in postgresql.conf on both master and a slave. Some of them are needed only in case our master would become a slave at some point - we want to make them beforehand.

  • wal_level - set it to hot_standby
  • max_wal_senders - it should be set to more than the number of current slaves
  • checkpoint_segments - value bigger than default 3. 16 may be a good start
  • wal_keep_segments - same value as checkpoint_segments
  • hot_standby - enable it

Next step would be to transfer the data from the master to the slave. To accomplish that, we are going to use pg_basebackup tool but first we need to remove current contents of the data directory on our slave- to-be:

rm -rf /var/lib/postgresql/9.4/main/*

Once it’s done, we execute pg_basebackup on our slave:

pg_basebackup --xlog-method=stream -D /var/lib/postgresql/9.4/main/ -U repl -h 10.0.0.101

Once the command finishes, you should see new data in PostgreSQL’s data directory on the slave. There are a couple of steps left, though. We need to prepare a recovery.conf file which will let our slave connect to the master. A file with the following content has to be created in /var/lib/postgresql/9.4/main/recovery.conf:

standby_mode = 'on'
primary_conninfo = 'host=10.0.0.101 port=5432 user=repl password=password'
trigger_file = '/tmp/failover.trigger'

Finally, we have to make sure all privileges are set correctly on the PostgreSQL data directory. We are now all set to start our slave.

chmod -R g-rwx,o-rwx /var/lib/postgresql/9.4/main/ ; chown -R postgres.postgres /var/lib/postgresql/9.4/main/

service postgresql start

We can now confirm from our master that slave has connected and is replicating:

$ psql
psql (9.4.8)
Type "help" for help.

postgres=# select client_addr, state, sent_location, write_location,
postgres-#         flush_location, replay_location from pg_stat_replication;
 client_addr |   state   | sent_location | write_location | flush_location | replay_location
-------------+-----------+---------------+----------------+----------------+-----------------
 10.0.0.102  | streaming | 0/130011E0    | 0/130011E0     | 0/130011E0     | 0/130011E0
(1 row)

As you can see, the process itself is not hard but it takes a while to perform and there are couple of steps where user can make a mistake and end up with replication not working correctly. Automation tools help with such tasks. Let’s take a look how to add another slave to our topology using ClusterControl:

First, we need to pick an ‘Add Replication Slave’ job.

You’ll be presented with a following dialog box:

Here you have to pick whether you want to add a new replication slave from scratch or replication is already configured and all we have to do is to register the slave with ClusterControl. Requirements are the same as for any other nodes managed by ClusterControl - the node has to be reachable from the controller using SSH. You can also choose to disable firewall and SELinux or AppArmor.

Once you start the job, you can monitor its progress in the Logs section.

Summary

As you can see, setting up PostgreSQL replication is not a complex task. It can be made dead easy if you use an external tool to automate the process. This is a great way to scale out your PostgreSQL deployment and add high availability.

In the next blog post, we will see what other high availability solutions are available for PostgreSQL.

What's new in ClusterControl Documentation

$
0
0

If you haven’t upgraded to ClusterControl 1.3.1, you should! It’s full of great new features and enhancements. We have lots of documentation to help you get started. Documentation on older versions is also available in our Github repository.

Wizard - Create Replication Setups for Oracle MySQL, MariaDB and Percona Server

It is now possible to create entire master-slave setups in one go via the deployment wizard. In previous versions, one had to first create a master, and afterwards, add slaves to it. Among other improvements, it is possible to encrypt client/server connections and let ClusterControl automatically set all slaves to read-only (auto_manage_readonly) to avoid accidental writes.

Wizard - Add Existing MySQL Cluster (NDB)

We recently added support for deployment of MySQL Cluster (NDB), and it is now also possible to import existing NDB Cluster deployments (2 MGMT nodes, x SQL nodes and y Data nodes).

Official Changelog

We now have two Changelog pages, one in our support forum (this is mostly for our development reference) and a new official one in the documentation. You can now easily browse all the changes between each release, including release features, type of release and package build numbers.

Check out the new Changelog page.

ClusterControl troubleshooting with debug package

ClusterControl Controller (cmon) now comes with a debuginfo package to help trace any crashes. It produces a core dump of the working memory of the server at the time the program crashed or terminated abnormally.

ClusterControl Controller (CMON) package comes with a cron file installed under /etc/cron.d/ which will auto-restart if the cmon process is terminated abnormally. Typically, you may notice if cmon process has crashed by looking at the “dmesg” output.

Check out the new debugging steps here.

Standby ClusterControl

It is possible to have several ClusterControl servers to monitor a single cluster. This is useful if you have a multi-datacenter cluster and need to have ClusterControl on the remote site to monitor and manage local nodes if the network connection between them goes down. However, the ClusterControl servers must be configured to be working in active/passive mode to avoid race conditions when digesting queries and recovering a failed node or cluster.

Check out the updated instructions to install the ClusterControl Standby server.

ClusterControl RPC key

ClusterControl v1.3.1 introduces and enforces an RPC key for any communication request to the RPC interface on port 9500. This authentication string is critical and must be included in any interaction between CMON controller and the client to obtain a correct response. The RPC key is distinct per cluster and stored inside CMON configuration file of the respective cluster.

ClusterControl Domain Specific Language (CCDSL)

The DSL syntax is similar to JavaScript, with extensions to provide access to ClusterControl’s internal data structures and functions. The CCDSL allows you to execute SQL statements, run shell commands/programs across all your cluster hosts, and retrieve results to be processed for advisors/alerts or any other actions.

Our javascript-like language to manage your database infrastructure has now been updated with several new features, for example:

  • Types:
    • CmonMongoHost
    • CmonMaxscaleHost
    • CmonJob
  • Functions:
    • JSON
    • Regular Expression
    • CmonJob
    • Cluster Configuration Job
  • Examples:
    • Interact with MongoDB

Check out the ClusterControl DSL page here.

We welcome any feedback, suggestion and comment in regards to our documentation page to make sure it serves the purpose right. Happy clustering!

ClusterControl Tips & Tricks - Best Practices for Database Backups

$
0
0

Backups - one of the most important things to take care of while managing databases. It is said there are two types of people - those who backup their data and those who will backup their data. In this blog post, we will discuss good practices around backups and show you how you can build a reliable backup system using ClusterControl.

Backup types

There are two main types of backup:

  • Logical backup - backup of data is stored in a human-readable format like SQL
  • Physical backup - backup contains binary data

Both complement each other - logical backup allows you to (more or less easily) retrieve up to a single row of data. Physical backups would require more time to accomplish that, but, on the other hand, they allow you to restore an entire host very quickly (something which may take hours or even days when using logical backup).

ClusterControl supports both types of backup: mysqldump for logical backup and xtrabackup for physical backup.

Backup schedule

Obviously, you’d want to have a fixed schedule for your backups. How often you want the backup to execute? It depends on your application, importance of data, time needed to take the backup and so on. We’d recommend to take a backup at least daily. When possible, you’d want to take both mysqldump and xtrabackup backups on a daily basis. To cover even more bases, you may want to schedule several incremental xtrabackup runs per day.

In ClusterControl you can easily schedule these different types of backups. There are a couple of settings to decide on. You can store a backup on the controller or locally, on the database node where the backup is taken. You need to decide on the location in which the backup should be stored, and which databases you’d like to backup - all data set or separate schemas? Depending on which backup type you’ve chosen, there are separate settings to configure. For Xtrabackup and Galera Cluster, you may choose if a node should be desynced or not. Are you going to use backup locks or maybe ‘FLUSH TABLES WITH READ LOCK’ should be used instead? Should the backup be compressed or not?

Which options to use will depend on your particular setup and hardware. For Galera Cluster, to avoid impact on the rest of the cluster, we’d suggest at least to think about desyncing the node for the duration of the backup. Please keep in mind this may also remove your backup node from rotation, this is especially true if you use HAProxy or MaxScale proxies.

Another popular way of minimizing the impact of a backup on a Galera Cluster or a replication master is to deploy a replication slave and then use it as a source of backups - this way Galera Cluster will not be affected at any point.

You can deploy such a slave in just a few clicks using ClusterControl.

Checking backup status

Taking a backup is not enough - you have to check if it actually completed correctly. ClusterControl can help with this. You can go to the Backup -> Reports tab and check the status of your backups. Have they completed successfully? What’s their size - is it as expected? This is a good way to do a quick sanity check - if your dataset is around 1GB of size, there’s no way a full backup can be as small as 100KB - something must have gone wrong at some point. To dig even deeper, you can take a look at the backup log and look for any errors.

Disaster Recovery

Storing backups within the cluster (either directly on a database node or on the ClusterControl host) comes in handy when you want to quickly restore your data: all backup files are in place and can be decompressed and restored promptly. When it comes to disaster recovery, this may not be the best option. Different issues may happen - servers may crash, network may not work reliably, even whole data centers may not be accessible due to some kind of outage. It may happen whether you work with a small service provider with a single data center, or a global vendor like Amazon or Rackspace. It is therefore not safe to keep all your eggs in a single basket - you should make sure you have a copy of your backup stored in some external location. ClusterControl supports Amazon S3 and Glacier services for that .

For those who would like to implement their own DR policies, ClusterControl backups are stored in a nicely structured directory. So it is perfectly fine to build and deploy your own set of scripts and handle DR according to your exact requirements.

Finally, another great way of implementing a Disaster Recovery policy is to use an asynchronous replication slave - something we mentioned earlier in this blog post. You can deploy such asynchronous slave in a remote location, some other data center maybe, and then use it to do backups and store them locally on that slave. Of course, you’d want to take a local backup of your cluster to have it around locally if you’d need to recover the cluster. Moving data between datacenters may take a long time, so having a backup files available locally can save you some time. In case you lose the access to your main production cluster, you may still have an access to the slave. This setup is very flexible - first, you have a running MySQL host with your production data so it shouldn’t be too hard to deploy your full application in the DR site. You’ll also have backups of your production data which you could use to scale out your DR environment.

We hope this gives you enough information to build a safe and reliable backup system.

All the Webinar Replays for the MySQL, MongoDB or PostgreSQL DBA

$
0
0

Those of you who already follow us know that we’ve been running a number of blog series for some time now that we also deliver as webinar series.

These blog series include:

And for those who are looking to automate the management of all of the above, we also have:

These blog series as well as related topics are covered monthly in our live webinars, which are available to view as replays.

Watch our webinar replays

So whether you’re interested in open source datastores such as MySQL, MariaDB, Percona, MongoDB or MySQL; load balancers such as HAProxy, MaxScale or ProxySQL; whether you’re in DB Ops or DevOps; looking to automate and manage your databases… Chances are that we have a relevant webinar replay for you!

These are the categories you can select from:

  • ClusterControl
  • DB Ops
  • DevOps
  • Galera
  • MongoDB
  • MySQL
  • PostgreSQL
  • Tips & Tricks

Or just perform a search for the topic or keyword of your choice and see what comes up.

We trust that these resources are useful!

If you have a topic you’d like to see covered that we haven’t dealt with yet, please do let us know.

Press Release: Severalnines boosts US healthcare provider’s IT operations

$
0
0

Accountable Health Inc uses ClusterControl to outcompete larger rivals

Stockholm, Sweden and anywhere else in the world - 20/07/2016 - Severalnines, the provider of database infrastructure management software, today announced its latest customer, Accountable Health INC (AHI). This move comes at a time when technology is disrupting healthcare globally with the introduction of self-service medicine kiosks and virtual medical consultations.

AHI is a US-based company which helps pharmaceutical and healthcare firms to enhance their business and technical performance. Subsidiaries of AHI, such as Connect Health Solutions and Accountable Health Solutions, help employers build health and wellness programmes to facilitate a stronger return on investment in employees. Severalnines’ ClusterControl enables AHI to remedy database issues affecting business performance.

This is the second time the IT team at AHI has chosen Severalnines’ ClusterControl over rivals such as Oracle, Microsoft and Rackspace to provide database infrastructure. With the acquisition of Connect Health Solutions, AHI learnt the existing database infrastructure was inadequate. The pressure on the database caused severe data overloads and failed to handle the massive queries the business required, meaning client portals crashed regularly and employees were waiting for hours for the server to upload claims documents. AHI estimated the previous IT set-up was losing the business thousands of dollars each day in productivity loss.

To compete in a highly competitive US healthcare market, AHI needed to achieve high database uptime, availability and reliability for all businesses across its portfolio. Having successfully deployed ClusterControl in the past, AHI deployed the database management platform again to improve technology performance and customer satisfaction. Other solutions were seen as unattainable due to technical complexity and prohibitive costs.

It took 10 days to fully deploy ClusterControl and migrate to a clustered database setup. Severalnines assisted AHI with the migration. AHI can now access Severalnines’ database experts with one phone call which is different to the tiered support systems offered by the large software vendors.

ClusterControl is now the database management platform for all wholly-owned subsidiaries of AHI, who themselves currently deploy clusters on commodity off-the-shelf hardware. The ease of deployment and management along with competitive pricing meant AHI could be agile in its growth strategy and compete with US healthcare rivals such as Trizetto, Optum and Cognizant Healthcare Consulting.

Greg Sarrica, Director of IT development at AHI, said: “Using ClusterControl was an absolute no-brainer for me. AHI looked for an alternative to Oracle and IBM, which could match our demands and with our budget. We wanted to give our clients frictionless access to their healthcare information without portals crashing and potentially losing their personal data. Now we have a solution that allows us to be agile when competing in the fast-moving US healthcare market.”

Vinay Joosery, Severalnines CEO said: “The security and availability of data is indicative of the performance of healthcare providers. The US healthcare industry is so compact that smaller businesses need to punch harder than their bigger rivals to gain market share. We are happy to be working with AHI and help the team there deliver fast and accurate customer service.”

About Severalnines

Severalnines provides automation and management software for database clusters. We help companies deploy their databases in any environment, and manage all operational aspects to achieve high-scale availability.

Severalnines' products are used by developers and administrators of all skills levels to provide the full 'deploy, manage, monitor, scale' database cycle, thus freeing them from the complexity and learning curves that are typically associated with highly available database clusters. The company has enabled over 8,000 deployments to date via its popular online database configurator. Currently counting BT, Orange, Cisco, CNRS, Technicolour, AVG, Ping Identity and Paytrail as customers. Severalnines is a private company headquartered in Stockholm, Sweden with offices in Singapore and Tokyo, Japan. To see who is using Severalnines today visit, http://www.severalnines.com/company.

About Accountable Health Solutions

Accountable Health Solutions was founded in 1992 as Molloy Wellness Company and acquired by the Principal Financial Group in 2004, with ownership transferred to Accountable Health, Inc., and whose name changed to Accountable Health Solutions in 2013.

Accountable Health Solutions offers comprehensive health and wellness programs to employers and health plan clients. Accountable Health combines smart technology, healthcare and behavior change expertise to deliver solutions that improve health, increase efficiencies and reduce costs in the delivery of healthcare. The company's product suite ranges from traditional wellness products to health improvement programs. Accountable Health Solutions is an industry leader with more than 20 years in the health and wellness industry and a 97% client retention rate. More at accountablehealthsolutions.com.

Press contact:

Positive Marketing
Steven de Waal/Camilla Nilsson
severalnines@positivemarketing.com
0203 637 0647/0643

ClusterControl Developer Studio: MongoDB Replication Lag Advisor

$
0
0

In the previous blog posts, we gave a brief introduction to the ClusterControl Developer Studio and the ClusterControl Domain Specific Language. We covered some useful examples, e.g., how to extract information from the Performance Schema and how to automatically have advisors scale your database clusters. ClusterControl Developer Studio allows you to write your own scripts, advisors and alerts. With just a few lines of code, you can already automate your clusters!

In this blog post, we will show you, step by step, how we implemented our MongoDB replication lag advisor in Developer Studio. We have included this advisor in ClusterControl 1.3.2, and enabled it by default on any MongoDB cluster or replicaSet.

MongoDB Replication lag

Why do we need advisors to warn us about replication lag? Imagine one of the secondary nodes in MongoDB is lagging behind for some unknown reason. This poses three risks:

  1. The MongoDB oplog is limited in size. If the node lags behind too far, it won’t be able to catch up. If this happens, a full sync will be issued and this is an expensive operation that has to be avoided at all times.
  2. Secondary nodes lagging behind are less likely to become primary after the primary node fails. A less favorable secondary node may be elected then.
  3. Secondary nodes lagging behind will less likely to be used for read requests offloading by the primary node. This increases the load on the primary.

As you can see, there are enough reasons to keep a close eye on the replication lag, to receive warnings on time and perform actions to prevent this from happening.

Calculating MongoDB Replication lag

To check the replication lag, it suffices to connect to the primary and retrieve this data using the replSetGetStatus command. In contrary to MySQL, the primary keeps track of the replication status of its secondaries.

A condensed version is seen below:

my_mongodb_0:PRIMARY> db.runCommand( { replSetGetStatus: 1 } )
{
… 
    "members" : [
        {
            "_id" : 0,
            "name" : "10.10.32.11:27017",
            "stateStr" : "PRIMARY",
            "optime" : {
                "ts" : Timestamp(1466247801, 5),
                "t" : NumberLong(1)
            },
            "optimeDate" : ISODate("2016-06-18T11:03:21Z"),
        },
        {
            "_id" : 1,
            "name" : "10.10.32.12:27017",
            "stateStr" : "SECONDARY",
            "optime" : {
                "ts" : Timestamp(1466247801, 5),
                "t" : NumberLong(1)
            },
            "optimeDate" : ISODate("2016-06-18T11:03:21Z"),
        },
        {
            "_id" : 2,
            "name" : "10.10.32.13:27017",
            "stateStr" : "SECONDARY",
            "optime" : {
                "ts" : Timestamp(1466247801, 5),
                "t" : NumberLong(1)
            },
            "optimeDate" : ISODate("2016-06-18T11:03:21Z"),
        }
    ],
    "ok" : 1
}

You can calculate the lag by simply subtracting the secondary optimeDate (or optime timestamp) from the primary optimeDate. This will give you the replication lag in seconds.

Query the Primary Node

As described in the previous paragraph: we need to query the primary node to retrieve the replication status. So how would you query only the primary node in Developer Studio?

In Developer Studio, we have specific host types for MySQL, MongoDB and PostgreSQL. For a MongoDB host, you are able to perform a query against MongoDB on the host using the executeMongoQuery function.

First we iterate over all hosts in our cluster, and then check if the selected node is the master by issuing a MongoDB query that returns this state:

for (i = 0; i < hosts.size(); i++)
{
    // Find the master and execute the queries there
    host = hosts[i];
    res = host.executeMongoQuery("{isMaster: 1}");
    if (res["result"]["ismaster"] == true) {
… 

Now that we have ensured we are on the primary node, we can query the host for the replication status:

res = host.executeMongoQuery("{ replSetGetStatus: 1 }");

This returns a map object that we can use to create a new array with the optime per host. Once we have found the master, we also keep a reference to the element in this array for later use:

for(o = 0; o < res["result"]["members"].size(); o++)
{
    node_status = res["result"]["members"][o];
    // Keep reference to the master host
    if (node_status["name"] == master_host)
    {
        optime_master = o;
    }
    optime_nodes[o] = {};
    optime_nodes[o]["name"] = node_status["name"];
    optime_nodes[o]["optime"] = node_status["optime"]["ts"]["$timestamp"]["t"];                   
}

Now it really has become easy to calculate the replication lag per host, and give advice if necessary:

// Check if any of the hosts is lagging
for(o = 0; o < optime_nodes.size(); o++)
{
    replication_lag = optime_nodes[optime_master]["optime"] - optime_nodes[o]["optime"];
    if(replication_lag > WARNING_LAG_SECONDS)
    {
        advice.setSeverity(Warning);
        msg = ADVICE_WARNING + "Host " + optime_nodes[o]["name"] + " has a replication lag of " + replication_lag + " seconds.";
    }
}

After scheduling the script the output will look similar to this in the advisor page:

Improvements

Naturally this check only advises for the pre-set replication lag. We can improve this advisor by also comparing the replication lag per host with the replication window inside the oplog. Once we have this metric inside ClusterControl, we will add this to the advisor.

Conclusion

With a very simple advisor, we are able to monitor the replication lag. Reasons for lagging can be network latency, disk throughput, concurrency and bulk loading. In the case of network latency, disk throughput and concurrency, you should be able to correlate these advisors with the respective graphs available in ClusterControl. For bulk loading, you would see this as an increase of writes in the ops counters.

The complete advisor

#include "common/helpers.js"
#include "cmon/io.h"
#include "cmon/alarms.h"

var WARNING_THRESHOLD=90;
var WARNING_LAG_SECONDS = 60;
var TITLE="Replication check";
var ADVICE_WARNING="Replication lag detected. ";
var ADVICE_OK="The replication is functioning fine." ;



function main(hostAndPort) {

    if (hostAndPort == #N/A)
        hostAndPort = "*";

    var hosts   = cluster::mongoNodes();
    var advisorMap = {};
    var result= [];
    var k = 0;
    var advice = new CmonAdvice();
    var msg = "";
    for (i = 0; i < hosts.size(); i++)
    {
        // Find the master and execute the queries there
        host = hosts[i];
        res = host.executeMongoQuery("{isMaster: 1}");
        if (res["result"]["ismaster"] == true) {
            master_host = host;
            optime_master = 0;
            optime_nodes = [];
            res = host.executeMongoQuery("{ replSetGetStatus: 1 }");
            // Fetch the optime per host
            for(o = 0; o < res["result"]["members"].size(); o++)
            {
                node_status = res["result"]["members"][o];
                // Keep reference to the master host
                if (node_status["name"] == master_host)
                {
                    optime_master = o;
                }
                optime_nodes[o] = {};
                optime_nodes[o]["name"] = node_status["name"];
                optime_nodes[o]["optime"] = node_status["optime"]["ts"]["$timestamp"]["t"];
                    
            }
            msg = ADVICE_OK;
            // Check if any of the hosts is lagging
            for(o = 0; o < optime_nodes.size(); o++)
            {
                replication_lag = optime_nodes[optime_master]["optime"] - optime_nodes[o]["optime"];
                if(replication_lag > WARNING_LAG_SECONDS)
                {
                    advice.setSeverity(Warning);
                    msg = ADVICE_WARNING + "Host " + optime_nodes[o]["name"] + " has a replication lag of " + replication_lag + " seconds.";
                }
            }
            
            if (advice.severity() <= 0) {
                advice.setSeverity(Ok);
            }
        }
        advice.setHost(host);
        advice.setTitle(TITLE);
        advice.setAdvice(msg);
        advisorMap[i]= advice;
    }
    return advisorMap;
}

ClusterControl 1.3 Released with New Features for MySQL, Percona Server, MariaDB, MongoDB & PostgreSQL

$
0
0

The Severalnines team is pleased to announce the release of ClusterControl 1.3.

This release contains key new features, such as Key Management for MySQL, MariaDB, Percona Server and PostgreSQL, improved security, additional Operational Reports, along with performance improvements and bug fixes.

Join us next week on Tuesday, May 24th, for a live demo!

Sign up for the webinar

Highlights

  • New for MySQL, MariaDB, Percona Server & PostgreSQL
    • Key Management
    • Additional Operational Reports
    • Improved Security
    • Create/Mirror Repository
  • New for MySQL
    • Deploy Production Setup of NDB/MySQL Cluster
  • New for MongoDB
    • Deploy Percona for MongoDB ReplicaSet Node

For additional details about the release:

Key Management: This new feature allows you to manage a set of SSL certificates and keys that can be provisioned on your clusters. Users can now create certificate authority certificates or self-signed certificates and keys, as well as easily enable and disable SSL encrypted client-server connections for MySQL and Postgres based clusters.

Additional Operational Reports for MySQL, MariaDB, Percona, MongoDB & PostgreSQL: In addition to the Operational Reports introduced in 1.2.12, users can now generate an Availability Summary of uptime/downtime for their managed clusters and see node availability and cluster state history during the reported period. It is also possible to generate a backup summary of backup success/failure rates for your managed clusters.

Improved security: We are now enforcing a unique Controller RPC API Token, which enables token authentication for your managed clusters. No user intervention is needed when upgrading older ClusterControl versions. An unique token will be automatically generated, set and enabled for existing clusters. See the ChangeLog for more details.

Create/Mirror Repository: Mirror your database vendor’s software repository without having to actually deploy a cluster. A mirrored local repository is used in scenarios where you cannot upgrade a cluster and must lock the db versions to use.

Deploy Production Setup of NDB/MySQL Cluster: Users can now create a production setup of NDB/MySQL Cluster from ClusterControl and deploy management, SQL/API and data nodes.

Deploy MongoDB ReplicaSet Node: Support for Percona MongoDB 3.x. Please also note that as of this version of ClusterControl, MongoDb 2.x is no longer supported.

There is a bunch of other features and improvements that we have not mentioned here. You can find all details in the ChangeLog.

We encourage you to test this latest release and provide us with your feedback. If you’d like a demo, feel free to request one.

With over 8,000 users to date, ClusterControl is the leading, platform independent automation and management solution for MySQL, MariaDB, Percona, MongoDB and PostgreSQL.

Thank you for your ongoing support, and happy clustering!

For additional tips & tricks, follow our blog: http://www.severalnines.com/blog/

Severalnines Launches #ClusterControl CrowdChat

$
0
0

Today we launch our live CrowdChat on everything #ClusterControl!

This CrowdChat is brought to you by Severalnines and is hosted by a team of subject matter experts. CrowdChat is a community platform that works across Facebook, Twitter, and LinkedIn to allow users to discuss a topic using a specific #hashtag. This crowdchat focuses on the hashtag #ClusterControl. So if you’re a DBA, architect, CTO, or a database novice, register to join and become part of the conversation!

Join this online community to interact with experts on how to best deploy, manage, monitor, and scale your database clusters. Get your questions answered and join the conversation around everything #ClusterControl.

Register free

Meet the experts

Art van Scheppingen is a Senior Support Engineer at Severalnines. He’s a pragmatic MySQL and Database expert with over 15 years experience in web development. He previously worked at Spil Games as Head of Database Engineering, where he kept a broad vision upon the whole database environment: from MySQL to Couchbase, Vertica to Hadoop and from Sphinx Search to SOLR. He regularly presents his work and projects at various conferences (Percona Live, FOSDEM) and related meetups.

Krzysztof Książek is a Senior Support Engineer at Severalnines, is a MySQL DBA with experience managing complex database environments for companies like Zendesk, Chegg, Pinterest and Flipboard.

Ashraf Sharif is a System Support Engineer at Severalnines. He has previously worked as principal consultant and head of support team and delivered clustering solutions for big websites in the South East Asia region. His professional interests focus on system scalability and high availability.

Vinay Joosery is a passionate advocate and builder of concepts and businesses around high availability database infrastructures. Prior to co-founding Severalnines, Vinay held the post of Vice-President EMEA at Pentaho Corporation - the Open Source BI leader. He has also held senior management roles at MySQL / Sun Microsystems / Oracle, where he headed the Global MySQL Telecoms Unit, and built the business around MySQL's High Availability and Clustering product lines. Prior to that, Vinay served as Director of Sales & Marketing at Ericsson Alzato, an Ericsson-owned venture focused on large scale real-time databases.

Become a ClusterControl DBA: Adding Existing Databases and clusters (updated)

$
0
0

In our previous blog post we covered the deployment of four types of clustering/replication: MySQL Galera, MySQL master-slave replication, PostgreSQL replication set and MongoDB replication set. This should enable you to create new clusters with great ease, but what if you already have 20 replication setups deployed and wish to manage them with ClusterControl?

This blog post will cover adding existing infrastructure components for these four types of clustering/replication to ClusterControl and how to have ClusterControl manage them.

Adding an existing Galera cluster to ClusterControl

Adding an existing Galera cluster to ClusterControl requires: mysql user with the proper grants and a ssh user that is able to login (without password) from the ClusterControl node to your existing databases and clusters.

Install ClusterControl on a separate VM. Once it is up, open the two-step dialogue for adding an existing cluster. All you have to do is to add one of the Galera nodes and ClusterControl will figure out the rest:

After this behind the scenes, ClusterControl will connect to this host and detect all the necessary details for the full cluster and register the cluster in the overview.

Adding an existing MySQL master-slave to ClusterControl

Adding of an existing MySQL master-slave topology requires a bit more work than adding a Galera cluster. As ClusterControl is able to extract the necessary information for Galera, in the case of master-slave, you need to specify every host within the replication setup.

After this, ClusterControl will connect to every host, see if they are part of the same topology and register them as part of one cluster (or server group) in the GUI.

Adding an MySQL NDB Cluster to ClusterControl

Adding an existing MySQL NDB Cluster takes four steps in total: defining SSH, management nodes, data nodes and finally the MySQL nodes.

After this ClusterControl will connect to the management, data and MySQL nodes and see if they are indeed part of the cluster. Then it will register the cluster, start monitoring and managing it.

Adding an existing PostgreSQL replication set to ClusterControl

Similar to adding the MySQL master-slave above, the PostgreSQL replication set also requires to fill in all hosts within the same replication set.

After this, ClusterControl will connect to every host, see if they are part of the same topology and register them as part of the same group.

Adding an existing MongoDB replica set to ClusterControl

Adding an existing MongoDB replica set is just as easy as Galera: just one of the hosts in the replica set needs to be specified with its credentials and ClusterControl will automatically discover the other nodes in the replica set.

Adding an existing MongoDB sharded cluster set to ClusterControl

Adding an existing MongoDB sharded cluster is almost as easy as a MongoDB replica set: all shard routers in the cluster need to be specified with its credentials, and ClusterControl will automatically discover all shards and replica sets in the cluster.

Expanding your existing infrastructure

After adding the existing databases and clusters, they now have become manageable via ClusterControl and thus we can scale out our clusters.

For MySQL, MongoDB and PostgreSQL replication sets, this can easily be achieved via the same way we showed in our previous blogpost: simply add a node and ClusterControl will take care of the rest.

For Galera, there is a bit more choice. The most obvious choice is to add a (Galera) node to the cluster by simply choosing “add node” in the cluster list or cluster overview. Expanding your Galera cluster this way should happen with increments of two to ensure your cluster always can have majority during a split brain situation.

Alternatively you could add a replication slave and thus create asynchronous slave in your synchronous cluster that looks like this:

Adding a slave node blindly under one of the Galera nodes can be dangerous since if this node goes down, the slave won’t receive updates anymore from its master. We blogged about paradigm earlier and you can read how to solve this in this blog post:

http://severalnines.com/blog/deploy-asynchronous-replication-slave-mariadb-galera-cluster-gtid-clustercontrol

Final thoughts

We showed you how easy it is to add existing databases and clusters to ClusterControl, you can literally add clusters within minutes. So nothing should hold you back from using ClusterControl to manage your existing infrastructure. If you have a large infrastructure, the addition of ClusterControl will give you more overview and save time in troubleshooting and maintaining your clusters.

Now the challenge is how to leverage ClusterControl to keep track of key performance indicators, show the global health of your clusters and proactively alert you in time when something is predicted to happen. And that’s the subject we'll cover next time.

Read also in the same series: Become a ClusterControl DBA - Deploying your Databases and Clusters

ClusterControl Tips & Tricks - Transparent Database Failover for your Applications

$
0
0

ClusterControl is a great tool to deploy and manage databases clusters - if you are into MySQL, you can easily deploy clusters based on both traditional MySQL master-slave replication, Galera Cluster or MySQL NDB Cluster. To achieve high availability, deploying a cluster is not enough though. Nodes may (and will most probably) go down, and your system has to be able to adapt to those changes.

This adaptation can happen at different levels. You can implement some kind of logic within the application - it would check the state of cluster nodes and direct traffic to the ones which are reachable at the given moment. You can also build a proxy layer which will implement high availability in your system. In this blog post, we’d like to share some tips on how you can achieve that using ClusterControl.

Deploying HAProxy using the ClusterControl

HAProxy is the standard - one of the most popular proxies used in connection with MySQL (but not only, of course). ClusterControl supports deployment and monitoring of HAProxy nodes. It also helps to implement high availability of the proxy itself using keepalived.

Deployment is pretty simple - you need to pick or fill in the IP address of a host where HAProxy will be installed, pick port, load balancing policy, decide if ClusterControl should use existing repository or the most recent source code to deploy HAProxy. You can also pick which backend nodes you’d like to have included in the proxy configuration, and whether they should be active or backup.

By default, the HAProxy instance deployed by ClusterControl won’t work correctly with a master-slave replication setup - it’s designed to implement round-robin type of load-balancing (e.g., for Galera Cluster where all nodes are writeable). There’s a way to go around this issue, though - in the following repository you can find a check script which is intended to work with MySQL Replication. You will need to replace the check deployed by ClusterControl with this particular file.

Keepalived is used to add high availability to the proxy layer. When you have at least two HAProxy nodes in your system, you can install Keepalived from the ClusterControl UI.

You’ll have to pick two HAProxy nodes and they will be configured as an active - standby pair. A Virtual IP would be assigned to the active server and, should it fail, it will be reassigned to the standby proxy. This way you can just connect to the VIP and all your queries will be routed to the currently active and working HAProxy node.

You can find more details in how the internals are configured by reading through our HAProxy tutorial.

Deploying MaxScale using ClusterControl

While HAProxy is a rock-solid proxy and very popular choice, it lacks database awareness, e.g., read-write split. The only way to do it in HAProxy is to create two backends and listen on two ports - one for reads and one for writes. This is, usually, fine but it requires you to implement changes in your application - the application has to understand what is a read and what is a write, and then direct those queries to the correct port. It’d be much easier to just connect to a single port and let the proxy decide what to do next - this is something HAProxy cannot do as what it does is just routing packets - no packet inspection is done and, especially, it has no understanding of the MySQL protocol.

MaxScale solves this problem - it talks MySQL protocol and it can (among other things) perform a read-write split. Installation of MaxScale from ClusterControl is simple - you want to go to Manage -> Load Balancer section and fill the “Install MaxScale” tab with the required data.

In short, we need to pick where MaxScale will be installed, what admin user and password it should have, which user it should use to connect to the database. Next, we can pick number of threads MaxScale should use, ports and which nodes should be added to the loadbalancer.

By default MaxScale is configured with two ways of accessing the database. You can use Round Robin listener on port 4006 - it will split connections between the available nodes in a round-robin fashion. If you want to use MaxScale’s ability to perform a read/write split, you need to connect to port 4008. Once connected,MaxScale will begin to parse your MySQL traffic and route it according to what queries you execute. In short, SELECT queries will be routed to slaves (or, in case of Galera Cluster, all nodes except of one picked as a master), remaining traffic will hit the master. Explicitly opened transactions will also open on the master only. In MySQL replication, the master is self-explanatory - it’s a master node which will be used by MaxScale. In Galera Cluster things are slightly different as it’s a multi-master environment. What MaxScale does is to check wsrep_local_index value on all Galera nodes - the one with the lowest index will be treated as a master. In case master goes down, another lowest-valued node is picked.

MaxScale, as every proxy, can become a single point of failure and it has to be made redundant to achieve high availability. There are a couple of methods to do that. One of them is to collocate MaxScale on the web nodes. The idea here is that, most of the time, the MaxScale process will work just fine and the reason for its unavailability is that the whole node went down. In such case, if MaxScale is collocated with the web node, not much harm has been done because that particular web node will not be available either.

Another method, not supported directly from the ClusterControl UI, is to use Keepalived in a similar way like we did in the case of HAProxy.

You can do most of the hard work from the UI - you need to deploy MaxScale on two hosts. Then, you want to deploy HAProxy on the same two nodes - so that ClusterControl would allow you to install Keepalived. That’s what you need to do next - install Keepalived, making sure the IP addresses of HAProxy you picked are the same as the IPs of your MaxScale nodes. Once Keepalived has been set up by ClusterControl, you can just remove the HAProxy nodes.

Next step requires CLI access - you need to log into both MaxScale (and Keepalived) nodes and edit the Keepalived configuration. On Centos it is located in /etc/keepalived/keepalived.conf. What you need to do is, basically, pass it through sed ‘s/haproxy/maxscale/g’ - replace all mentions of haproxy with maxscale and then apply changes through restart of Keepalived on both nodes. Last step would be to edit MaxScale’s configuration and make sure it listens on either Virtual IP or on all interfaces - restart MaxScale to apply your changes and you are all set: your MaxScale health will be monitored by Keepalived and, in case of failure of the active node, Virtual IP will be moved to the standby node.

Given how MaxScale decides which one of the nodes in a Galera Cluster is a “master”, as long as you do not use any stickiness (by default, the master node is a node with the lowest wsrep_local_index which means that old master will become a master again, if it ever comes back online - you can change that so MaxScale would stick to the new master), all MaxScale nodes will see the cluster in the same way. You just have to make sure all nodes of the cluster have been added to MaxScale.

ClusterControl 1.3.2 Released with Key MongoDB Features - Sharded Deployments, Cluster-Consistent Backups, Advisors and more

$
0
0

The Severalnines team is pleased to announce the release of ClusterControl 1.3.2.

This release contains new features, such as deploying MongoDB sharded clusters and scheduling cluster-consistent backups, MongoDB Advisors, a new alarm viewer and new deployment wizard for MySQL, MongoDB & PostgreSQL, along with performance improvements and bug fixes.

Highlights

  • For MongoDB
    • Deploy or add existing MongoDB sharded clusters
    • Support for Percona consistent MongoDB backup
    • Manage MongoDB configurations
    • MongoDB Advisors
    • New overview page for sharded clusters and performance graphs
  • For MySQL, MongoDB & PostgreSQL
    • New Alarm Viewer
    • New Deployment Wizard

For more details and resources:

Deploy or add existing MongoDB sharded clusters

Not only can users now deploy MongoDB sharded clusters, but adding your existing sharded cluster to ClusterControl is as easy as adding a replica set: all shard routers in the cluster need to be specified with its credentials, and ClusterControl will automatically discover all shards and replica sets in the cluster. Supports Percona MongoDB and MongoDB Inc v3.2.

Manage MongoDB configurations

MongoDB configuration management includes functionality such as: change the configuration, import configurations for all nodes and define/alter templates. Users can immediately change the whole configuration file and write this configuration back to the database node. With this latest release of ClusterControl, users can manage MongoDB configurations even more intuitively than before.

New overview page for sharded clusters and performance graphs

The MongoDB stats and performance overview can be found under the Performance tab of your ClusterControl instance. Mongo Stats is an overview of the output of mongostat and the Performance overview gives a good graphical overview of the MongoDB opcounters. It now includes a per replicaSet/Config Server/router view for sharded clusters, alongside performance graphs.

Support for Cluster Consistent MongoDB backup

ClusterControl now supports Percona’s Consistent MongoDB backup, if installed on the ClusterControl controller node. Percona’s Consistent MongoDB backup is able to create a consistent cluster backup across many separate shards. It auto-discovers healthy members for backup by considering replication lag, replication 'priority' and by preferring 'hidden' members.

New Alarm Viewer

The enhanced viewer gives the user a better overview of events, especially if you have multiple clusters. Alarms and jobs for all clusters are now consolidated in a single view with a timeline of each event/alarm. Click on each event name to view related logs to the event/alarm and take the relevant actions required to avoid potential issues.

New Deployment Wizard

It is now possible to create entire master-slave setups in one go via our new deployment wizard. In previous versions, one had to first create a master, and afterwards, add slaves to it. You can now do it all in one go. The wizard supports MySQL Replication, MySQL Galera, MySQL/NDB, MongoDB ReplicaSet, MongoDB Shards and PostgreSQL.

There is a bunch of other improvements that we have not mentioned here. You can find all details in the ChangeLog.

We encourage you to test this latest release and provide us with your feedback. If you’d like a demo, feel free to request one.

With over 8,000 users to date, ClusterControl is the leading, platform independent automation and management solution for MySQL, MariaDB, Percona, MongoDB and PostgreSQL.

Thank you for your ongoing support, and happy clustering!

For additional tips & tricks, follow our blog: http://www.severalnines.com/blog/.

Viewing all 203 articles
Browse latest View live