# How to scale using Kafka Connect

**URL:** <https://forum.confluent.io/t/how-to-scale-using-kafka-connect/668>\
**Category:** Kafka Connect\
**Created:** [5 February 2021 01:38 UTC](https://forum.confluent.io/t/how-to-scale-using-kafka-connect/668 "2021-02-05T01:38:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anu](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/anu/32/284_2.png) [@Anu](https://forum.confluent.io/u/Anu)\
**Post date:** [5 February 2021 01:38 UTC](https://forum.confluent.io/t/how-to-scale-using-kafka-connect/668/1 "2021-02-05T01:38:24Z")

</div>

In my scenario a single table(SOURCE connect) exists. A deployed kafka connector will only deploy one consumer(worker) to capture data events from the source table(assume I am capturing events via cdc). How do I go about scaling my application and support kafka key message ordering?

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [5 February 2021 09:32 UTC](https://forum.confluent.io/t/how-to-scale-using-kafka-connect/668/2 "2021-02-05T09:32:54Z")

</div>

Hi @Anu - to clarify, are you meaning you want to increase the rate at which you ingest changes from the database into Kafka, and that a single Kafka Connect task isn’t able to keep up with the throughput?

---

<div class="post-metadata">

**Author:** ![Anu](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/anu/32/284_2.png) [@Anu](https://forum.confluent.io/u/Anu)\
**Post date:** [5 February 2021 16:04 UTC](https://forum.confluent.io/t/how-to-scale-using-kafka-connect/668/3 "2021-02-05T16:04:00Z")

</div>

Hello Robin.

Firstly, LOVE the forum idea. Perfect way to capture kafka topic discussions. Secondly, yes your statement regarding my scenario is correct. If there is only one consumer how do I consider scaling for a higher throughput?

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [5 February 2021 16:33 UTC](https://forum.confluent.io/t/how-to-scale-using-kafka-connect/668/4 "2021-02-05T16:33:35Z")

</div>

> [@Anu](#):
>
> Firstly, LOVE the forum idea. Perfect way to capture kafka topic discussions

🎉 I’m glad you like it! 🙂

> [@Anu](#):
>
> If there is only one consumer how do I consider scaling for a higher throughput?

Each connector will have its own definition of how it can partition workload for scaling up to `tasks.max`. If you hit that limit and still find you’re bottlenecking you’ll need to analyse where that bottleneck is (for example, network interface) and vertically scale that on the worker node.

---

<div class="post-metadata">

**Author:** ![Anu](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/anu/32/284_2.png) [@Anu](https://forum.confluent.io/u/Anu)\
**Post date:** [5 February 2021 16:36 UTC](https://forum.confluent.io/t/how-to-scale-using-kafka-connect/668/5 "2021-02-05T16:36:39Z")

</div>

Robin,  
THANK YOU always appreciate your mentorship. Will make note of your feedback in our kafka design strategy 🙏

---

<div class="post-metadata">

**Author:** ![shree](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@shree](https://forum.confluent.io/u/shree)\
**Post date:** [8 February 2021 13:12 UTC](https://forum.confluent.io/t/how-to-scale-using-kafka-connect/668/6 "2021-02-08T13:12:49Z")

</div>

Maybe an addon to this question, how does the jdbc connector scale up on the DB side?  
Will it create multiple DB sessions to ingest data faster into kafka topics?  
Is this something once would need to specifically set via an configuration parameter? Or will just ensuring that tasks.max \> 1 enables the concurrency?  
Following is our setup for context:  
tasks.max = 25, topic is 50-100 partitions and 10 tables on DB side.  
We still see just on session being opened by jdbc connector.

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [8 February 2021 13:18 UTC](https://forum.confluent.io/t/how-to-scale-using-kafka-connect/668/7 "2021-02-08T13:18:43Z")

</div>

As I understand it, the JDBC source connector will treat tables as units of parallelism. That is, if you have ten tables it could run ten tasks, each polling the tables in parallel. If you’re not seeing this behaviour perhaps start another topic and we can walk through some debug steps to see what’s going on.
