DEV Community

NaveenKumar Namachivayam ⚡
NaveenKumar Namachivayam ⚡

Posted on

1 1

Performance Testing Neo4j Database using Bolt Protocol in Apache JMeter

Introduction

Apache JMeter 5.2 has been released with lots of new features, enhancements, and bug fixes. JMeter 5.2 supports Bolt protocol out of the box. No need to install it via Plugins Manager. This blog post provides you an overview about performance testing Neo4j database using Bolt protocol in Apache JMeter 5.2

Prerequisite

Bolt Connection Configuration and Bolt Request

First, you need to add the basic elements such as Thread Group, Bolt Connection Configuration, and View Results Tree, then you need to add Bolt Request.

In Bolt Connection Configuration, you need to add the Bolt URI with the valid credentials. Default credentials of Neo4j is neo4j/neo4j. At first login, it will prompt you to change the password.

Once the connection is set up, next you need to load up the demo data in your Neo4j.

Detailed instructions are in here.

Bolt communicates over 7687 port.

Neo4j can be accessed from your favorite browser using http://localhost:7474.

Now, head back to JMeter and enter the below command in the Bolt Request.

MATCH (n:Movie) RETURN n LIMIT 25

Make sure you set the Record Query Results flag set to true, and then hit run.

In View Results Tree, you can see the response as shown below.

JMeter Output

Limitations

  • You cannot configure the pool size of Bolt Connection in this inception implementation.

  • You need to set the Record Query Results set to false for better performance.

Video Demo

Here is the complete video demo.

Sample Bolt Request Script

Bolt-Protocol-Script-JMeter

This repo has the sample JMeter test plan to demonstrate Bolt request. For detailed instruction, please visit my blog

Donate

Buy me a teaBuy me a tea




Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay