# How to Throttle Cadence®

[Blog](/blog/)&gt;[Technology](/blog/category/technical/)&gt;How to Throttle Cadence® 

How to Throttle Cadence®
========================

October 10, 2023 | By [ Rony Rahman](https://www.instaclustr.com/blog/author/rony-rahman/)

 

 

 

 



   [ ](https://x.com/intent/tweet?text=How%20to%20Throttle%20Cadence%C2%AE&url=https://www.instaclustr.com/blog/how-to-throttle-cadence/) [ ](https://www.linkedin.com/shareArticle?mini=true&url=https://www.instaclustr.com/blog/how-to-throttle-cadence/&title=&summary=How%20to%20Throttle%20Cadence%C2%AE&source=) 

Originally developed and open sourced by Uber, Cadence® is a workflow engine that greatly simplifies the development of complex, long-running automated business processes at scale. NetApp offers Cadence on the Instaclustr Platform, providing fully automated provisioning and ongoing management of Cadence and its dependent technologies (Apache Cassandra®, Apache Kafka®, and OpenSearch®). This blog provides some background into one aspect of the behind–the–scenes implementation of our [Developer Shared Infrastructure offering for Cadence](https://www.instaclustr.com/blog/instaclustr-cadence-workflow-developer/).

Cadence is capable of scaling out horizontally to handle millions of concurrent workflows. However, sometimes it may be necessary to slow down the activities within Cadence services for various reasons like server maintenance and backend database maintenance. The scenario that we were facing was setting up a few small Cadence clusters, each using shared back-end services (Cassandra, Kafka, OpenSearch). We did not want a user of one Cadence cluster to be able to take more than their allocated share of the processing capacity of the shared back-end services.

Achieving this outcome was pretty simple with Cadence once we found the right settings to configure. These settings, found in the <https://github.com/uber/cadence/blob/master/common/dynamicconfig/constants.go> file, are listed below:

Set A – Internal Service Request Limits































// Request rate per second for each frontend host/service // KeyName: frontend.rps // Value type: Int // Default value: 1200

   1

2

3

4

5

6

7



  // Request rate per second for each frontend host/service 



// KeyName: frontend.rps 



// Value type: Int 



// Default value: 1200



   

 

 





























// Request rate per second for each matching host/service // KeyName: matching.rps // Value type: Int // Default value: 1200

   1

2

3

4

5

6

7



  // Request rate per second for each matching host/service 



// KeyName: matching.rps 



// Value type: Int 



// Default value: 1200



   

 

 





























// Request rate per second for each history host/service // KeyName: history.rps // Value type: Int // Default value: 3000

   1

2

3

4

5

6

7



  // Request rate per second for each history host/service 



// KeyName: history.rps 



// Value type: Int 



// Default value: 3000



   

 

 Set B – Back End (Database) Request Limits































// This is the max rate that frontend service can query DB // KeyName: frontend.persistenceMaxQPS // Value type: Int // Default value: 2000

   1

2

3

4

5

6

7



  // This is the max rate that frontend service can query DB 



// KeyName: frontend.persistenceMaxQPS 



// Value type: Int 



// Default value: 2000



   

 

 





























// This is the max rate that matching service can query DB // KeyName: matching.persistenceMaxQPS // Value type: Int // Default value: 3000

   1

2

3

4

5

6

7



  // This is the max rate that matching service can query DB 



// KeyName: matching.persistenceMaxQPS 



// Value type: Int 



// Default value: 3000



   

 

 





























// This is the max rate that history service can query DB // KeyName: history.persistenceMaxQPS // Value type: Int // Default value: 9000

   1

2

3

4

5

6

7



  // This is the max rate that history service can query DB 



// KeyName: history.persistenceMaxQPS 



// Value type: Int 



// Default value: 9000



   

 

 





























// This is the max rate that worker host can query DB // KeyName: worker.persistenceMaxQPS // Value type: Int // Default value: 500

   1

2

3

4

5

6

7



  // This is the max rate that worker host can query DB 



// KeyName: worker.persistenceMaxQPS 



// Value type: Int 



// Default value: 500



   

 

 Both of the sets above can be used to slow down internal Cadence operations by assigning smaller values to the respective properties. More specifically, **Set A** can be used to slow down request rates to Cadence internal services (i.e., frontend, matching and history), and **Set B** can be used to slow down request rates from Cadence internal services to the backend database (i.e., Cassandra).

If you like the sound of this but don’t want to go through the work of figuring out how to set them up yourself, Instaclustr’s Managed Cadence offering already supports this through its [Development Shared Infrastructure](https://www.instaclustr.com/blog/instaclustr-cadence-workflow-developer/) offering.

[Sign up today](https://console2.instaclustr.com/signup?_ga=2.186190569.1961728604.1663301903-571176061.1660607774&_gac=1.180215254.1662705466.Cj0KCQjwpeaYBhDXARIsAEzItbGyU2L_7auA1tegbxpSsITqSew4-nbvwp1Rz43nX0gcWjcD6s2h0DAaAiuCEALw_wcB) and experience it yourself with a free trial!

 

### About the author

**[Rony Rahman](https://www.instaclustr.com/blog/author/rony-rahman/)** | Lead Software Engineer

Rony is a Lead software engineer at Instaclustr. He is based in Canberra, Australia.

 



 

 ![mail icon]()#### Get the latest articles for open sourceIn your inbox

 <a class="btn btn-primary btn-popup text-dark" href="">Sign up now</a> 

 

 

 

  ### Related content

 [ Cadence® Connection Examples Using TLS 

 

 Learn how to establish a secure TLS connection to the Cadence server with our code snippets using Go and Java SDKs. Discover our ... 

 

 

 

 

 

 

 ](https://www.instaclustr.com/blog/cadence-connection-examples-using-tls/) 

 [ Cadence® iWF 

 

 Find out how Cadence and Instaclustr Workflow (IWF) make it easy to manage complex workflows with high reliability and scalability... 

 

 

 

 

 

 

 ](https://www.instaclustr.com/blog/cadence-iwf/) 

 [ Instaclustr Releases Managed Cadence for Public Preview 

 

 Cadence is a stateful programming system that simplifies building scalable, distributed applications and workflows... 

 

 

 

 

 

 

 ](https://www.instaclustr.com/blog/instaclustr-releases-managed-cadence-for-public-preview/) 

 

  <a class="close-modal" href="">×</a>Sign upto ourNewsletter
-----------------------
