16 June 2017   |

  • #MySQL

How to enable and set Rolling for MySQL General Log in a MySQL RDS Instance

by Vaibhav Puranik

Enabling general log in your MySQL RDS instance can be very useful. Especially for auditing and accountability purposes. It’s usually useful to debug problems too. General log can log every single query on your database in mysql.general_log table. Alternatively you can also log all the queries to a log file, but in RDS instance, logging them to a table was the best option in our  situation. More information about general log can be obtained from MySQL documentation. Here is a sample records from one of our general log: general-log

mysql.general_log table

This table has the following columns: event_time, user_host, thread_id, server_id, command_type, argument. For us event time, user_host and argument (query) are the most important columns. They can tell us which application/user executed a given query at a given time.

You can enable general log by modifying the Db Parameter Group associated with your RDS instance. To enable table based log, all you really need to do is set general_log parameter to 1. The log_output is by default set to TABLE. Thus unless you want to switch your log to a file based log, you don’t have to modify anything else. If you want to set a file based log, you will need to modify log_output parameter. More detailed information about the parameters can be obtained fromRDS documentation. Good news is that the general_log Db Parameter is dynamic and it means you do not have to reboot your RDS instance.

15 June 2017   |

An Ad Impression Forecasting Tool Built With Apache Spark

by Michael Williams, Data Scientist ( )

Much can be said about the cutting edge technologies developed and used by GumGum, but a core component of GumGum’s business involves the effective display of digital advertisements. We work with agencies and brands to create engaging and relevant ads that are shown on the websites of our publisher partners. To accomplish this, we rely on being able to carefully target ads to specific user groups in specific browsing situations. A typical behind-the-scenes conversation between GumGum and one of its advertising partners might proceed as follows.

Advertiser: “We want 100,000 BMW ads displayed to males, age 25-40, living on the West Coast, making $150k per year, using a mobile device. Can you do it?”

GumGum: “Hmm, let me check...”

Load more