Category Archives: Case Study


Use Case: You got a postgres database and you need to move data to elastic search for exploration

Setup Elastic Search on Ubuntu

  1. sudo apt update
  2. sudo apt install default-jdk
  3. wget -qO - | sudo apt-key add -
  4. Add the Elasticsearch repository to the package manager echo "deb stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
  5. Update the package manager sudo apt update
  6. Install Elasticsearch:sudo apt install elasticsearch
  7. Configure Elasticsearch:
    • sudo vi /etc/elasticsearch/elasticsearch.yml
    • Inside the file, find the setting set it to the IP address of your server or use to listen on all network interfaces.
    • if using network host as set, discovery.seed_hosts: [“”, “[::1]”]
    • set security –
      • true
      • true
  8. Start and enable Elasticsearch:
    • sudo systemctl start elasticsearch
    • sudo systemctl enable elasticsearch
  9. Verify Elasticsearch installation: -XGET http://localhost:9200
  10. sudo /usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive

Setup LogStash

  1. Install Logstash:
  2. Create a Logstash Configuration File: postgresql.conf
  3. Run Logstash: bin/logstash -f /path/to/postgresql.conf

Sample postgresql.conf

input {
  jdbc {
    jdbc_connection_string => "jdbc:postgresql://localhost:5432/postgres"
    jdbc_user => "username"
    jdbc_password => "password"
    jdbc_driver_library => "/path/postgresql.jar"
    jdbc_driver_class => "org.postgresql.Driver"
    statement => "select id, name, date_of_birth from employee;"
    jdbc_default_timezone => "UTC"
    jdbc_fetch_size => 1000

output {
  elasticsearch {
    hosts => ["http://localhost:9200"]
    index => "employee_index"
    document_id => "%{employee_id}"
    user => "elastic"
    password => "password"

Case Study: How Razorpay’s Notification Service Handles Increasing Load

Interesting read on how Event Prioritization and Introducing a Data Stream to manage data asynchronously helped the team to increase the performance of the system and handle corner cases.

  1. They prioritized events to make sure important events do not suffer
  2. Introduced a layer (stream) instead of writing directly to the database
  3. Reduce Conumse priority if the time taken is beyond a limit
  4. Rate Limiting to filter out probable DOS events