Download - Mood of Mysql

Transcript
Page 1: Mood of Mysql

Mood of Mysql

Vishnu RaoFlipkart Supply Chain - Platform Team

Page 2: Mood of Mysql

● Music is the best way to express how one feels.

● Well, Mysql has a soul too, it has a mood :)

● Mysql can sing through each query(good/bad) it gets.

● Every query, Mysql gets, is intercepted in log.cc and sent acrross to an MQ Server. Subscribers to the queue ,on receiving a message play a musical note depending on the query they get.

Note:image is from http://www.technocation.org

Page 3: Mood of Mysql

The symphony orchestra

DB

Queries

MQ

S S S

Subscribers to a Message Queue, who on receiving a message/query play a musical note

Page 4: Mood of Mysql

Use case: Divide & Conquer General query log● Alternative to enabling general query log, which grows very

fast in size and disk space becomes a concern on the master database.

● The queries are sent out to a queue on an MQ Server and an army of subscribers who listen to the queue , log the query on receiving a message.

● The general query log can now be distributed (among the subscribers)

.● More number of subscribers => smaller the log & easy to

rotate.

Page 5: Mood of Mysql

Time to Sing :)

Note:image is from http://www.technocation.org