DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. A Workload Generator for Couchbase in OpenShift

A Workload Generator for Couchbase in OpenShift

Want to find the weak spots in your environment? If you're not familiar with cbc-pillowfight, here's your chance to test your data layer.

Laura Czajkowski user avatar by
Laura Czajkowski
·
Jan. 25, 17 · Tutorial
Like (1)
Save
Tweet
Share
3.48K Views

Join the DZone community and get the full member experience.

Join For Free

Recently, I have been working on a project to deploy a Couchbase cluster in OpenShift. I needed to simulate a workload and assess the performance of the cluster and its tolerance to failure. At first, I thought about migrating one of our applications to OpenShift, but that was way too painful for such a simple and common need. I also thought about creating my own injector, but I’m too lazy for that! Then I talked to Michael Hirschberg, a Couchbase champion, to understand how he validates new Couchbase releases or new hardware. He pointed me to cbc-pillowfight. In case you don’t know this tool, have a look here.

That looked very promising, all I had to do was to deploy it in OpenShift… but I had no idea how to do that! So OK, OpenShift runs the applications in Docker containers, so that meant the first step was to create a Docker image. After a few tries, I came up with this Dockerfile based on CentOS, very simple and straightforward. The important bit was to use only one RUN command to reduce the number of layers and pass the cbc-pillowfight parameters as Docker parameters, to make it generic. The Dockerfile can be compiled and pushed to a repo with these commands:

You can find the compiled Docker image here. Now, all I needed was to create an OpenShift template, taking all the previous parameters in input. I added a replication controller to easily scale my injection, and a suffix is appended to its name so you can deploy several injectors with different parameters. And we’re done! Pretty simple, right? Now I can simulate any kind of traffic to my Couchbase cluster running in OpenShift and increase this traffic simply by adding replicas to my replication controller.

Here is an example how to use it:

I easily reached 46k ops/sec in a tiny environment, and it is honestly super convenient to use. I uploaded a YouTube video to show you how to use it.


My Environment

Here are the details of my environment:

Hardware

VMs

Storage

Distribution of Pods

Couchbase Console 

System Metrics

Check this out for some more on that.

Conclusion

We can clearly see that the bottleneck of my environment is the CPU. I could improve the performance by adding more vCPUs to my VMs, but that’s not the point of this post.

I strongly believe the integration of datastores in OpenShift will become more and more popular in local environments at least, most probably in test environments too and maybe even in production, once it will be supported by the different vendors. It is a great way to standardize the management of the data layer. This OpenShift template for cbc-pillowfight will then be the perfect tool to generate a workload on your Couchbase cluster!

OpenShift Docker (software)

Published at DZone with permission of Laura Czajkowski, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • What’s New in the Latest Version of Angular V15?
  • High-Performance Analytics for the Data Lakehouse
  • Developer Productivity: The Secret Sauce to Building Great Dev Teams
  • Mission-Critical Cloud Modernization: Managing Coexistence With One-Way Data Sync

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: