Archive for 2017

my: a command-line tool for MariaDB Clusters

I’ve posted the code for my MariaDB Cluster command-line tool called my. It does a bunch of stuff but the main purpose is to allow you to easily monitor replication cluster-wide while working in the shell. Here’s an example of this screen… hostname port cons u_cons role repl_detail lag gtid read_only master1 3306 7 0 ms […]

Notes from the field: CockroachDB Cluster Setup

Download the CockroachDB Binary Perform on each node. ?View Code BASHwget tar xvzf cockroach-latest.linux-amd64.tgz mv cockroach-latest.linux-amd64/cockroach /usr/bin/ chmod +x /usr/bin/cockroach Create cockroach user and directories Perform on each node. ?View Code BASHgroupadd cockroach useradd -r cockroach -g cockroach su – cockroach cd /home/cockroach mkdir -p certs my-safe-directory cockroach_db Check ntp status Check NTP is […]

MongoDB: Making the most of a 2 Data-Centre Architecture

There’s a big initiative at my employers to improve the uptime of the services we provide. The goal is 100% uptime as perceived by the customer. There’s obviously a certain level of flexibility one could take in the interpretation of this. I choose to be as strict as I can about this to avoid any […]

MongoDB and the occasionally naughty query

It’s no secret that databases like uniqueness and high cardinality. Low cardinality columns do not make good candidates for indexes. A recent issue I had with MongoDB proved that NoSQL is no different in this regard. The MongoDB Query Planner is quite simple and works as follows (simplified)… If there are no usable indexes; perform a collation […]

A few Splunk queries for MongoDB logs

Here’s a few Splunk queries I’ve used to supply some data for a dashboard I used to manage a MongoDB Cluster. Election events If any MongoDB elections happen at 3AM on a Wednesday night I want to know about it. This query, added to a single value panel allows me to do this easily… host=mongo* […]