It’s All Fun And Games Until…: A Tale of Repetitive Stress Injury (Eric Evans)
Basically, watch out for yourself. If it hurts, you are doing something wrong. It’s good to be reminded about that from time to time. So, watch out for yourself:
— Alexey Hanin (@alexeyhanin) June 2, 2015
A complete Tweet index on Apache Lucene (Michael Busch)
Michael Busch has given this talk in one version or the other for a couple of years now. Unfortunately it got more shallow now, not so many technical details about how they optimized Lucene for Twitter. Numbers are great, they have two billion queries per day and about 500 million tweets per day. One thing that he didn’t mention in his earlier talks is that they actually figured that Earlybird does scale to Twitter level requests due to the Earthquake in Japan when they had to emergency shutdown the caching layer in front (which was Ruby on Rails and did not scale that well). Nowadays they have all tweets in a pretty vanilla Lucene with some additions (going to be open sourced soon) and use a Mesos cluster in case they have to reindex all the data.
And BTW: Tweet IDs encode the timestamp the tweet was send at.
Automating Cassandra Repairs (Radovan Zvoncek)
First time speaker Radovan did a pretty good job. Apparently there are several ways to get to the „consistency“ of the „eventual consistency“ in Cassandra, which are Read Repair, Hinted Handoff and full blown anit-entropy repairs. The latter ones apparently can lead to a lot of problems if done improperly, so Spotify build something to manage that: Reaper. The problems are usually due to disk IO limits, network saturation or just plain full disks. Spotify Reaper orchestrates anti-entropy repairs to make them reliable.
I’m still somewhat confused that one aparently has to spend a lot of time repairing Casandra clusters. I always thought that was what Cassandra was doing.
Diving into Elasticsearch Discovery (Shikhar Bhushan)
For all the people who forgot, like me, how ES clustering works this was a good reminder. Plus I learned that discovery is pluggable, so you can write your own plugin to provide the clustering part for ES. He apparently did and wrote Eskka, an Akka based clustering approach. Writing your own apparently isn’t that much fun because APIs change all the time. Just in case you forgot, Zen is the default way ES clusters.
Change Data Capture: The Magic Wand We Forgot (Martin Kleppmann)
— Alexey Hanin (@alexeyhanin) June 2, 2015
We all know the problem Martin was describing: same data in different form, like in your database, in your cache, in your search engine. He went back to the „Change Data Capture“ principle, which basically says „save once, distribute everywhere“. So in order to realize that he wrote a PostgreSQL plugin „Bottled Water“ which gets the changes from Postgres and posts them to a Kafka topic. Yay for the best project name this year in the category: will never find that on google.
His implementation and idea is solid, the problem is that it is a Kafka topic per table, so you actually loose the transaction when reading from Kafka. Otherwise it is transaction save, messages are only sent when the transaction in Postgres commits. He uses Avro on the wire and transforms the Postgres DDL Schema to an Avro schema.
If you want to get your transaction back you would need a stream processor (Storm/Spark) downstream to reassemble your transactions. Might be a good idea if you already have a Postgres DB or rely on some special properties of a centralized Datastore, otherwise it is OK if your microservices write directly to Kafka.
Has someone actually coined the word „nanoservices“ yet for designs that basically do just one thing? Like take the request, write it to a queue (Kafka) and all other processing taking place by consumers down the queue that do just one thing as well.
Designing Concurrent Distributed Sequence Numbers for Elasticsearch (Boaz Leskes)
Elasticsearch is rewriting the way they do distributed indexing based on the Raft Consensus Algorithm. Sounds great, they are mitigating a lot of problems they do have right now.
Apache Lucene 5 – New Features and Improvements for Apache Solr and Elasticsearch (Uwe Schindler)
Apparently, Lucene 4 broke a lot of indexes due to it’s build in backward compatibility to Lucene <=3. With two big companies actually relying on Lucene, that kind of amazes me.
Lucene 5 gets rid of all this legacy stuff and drops support for older indexes. Plus it adds a lot of data safety features when it comes to on-disk indices like checksums and sequence numbers. So, Solr and Elasticsearch should finally be production ready …. ;).
JDK seems to keep breaking Lucene (remember that the initial JDK 7 release broke Lucene?), apparently one should not use G1 GC with Lucene (es? Solr?).
And Lucene 5 uses a lot of the „new“ JDK 7 APIs for IO to finally get the index safely to disk.
Real-Time Monitoring of Distributed Systems (Tobias Kuhn)
Less distributed, more of Real-Time monitoring. Apparently they build their own system for analyzing their loggs for anomaly detection, punnily named Anna Molly, which was open sourced now.
They made pretty clear that thresholds are not enough if you have a highly dynamic system that can change on multiple dimensions any time. Seasonality of your date makes it even harder to define useful thresholds. There are a couple of algorithms which can be used for anomaly detection, namely Tukey’s outlier detection and seasonal trend decomposition. And T-digest comes to the rescue of course.
For monitoring they actually use a cascade of statsd and carbon.
To sum up bbuzz 2015:
The winning buzzword at #bbuzz 2015 seems to be anomaly detection. Find all the anomalies in all your data!
— Marcus Thiesen (@mthiesen) June 2, 2015