Home > Mobile >  Set aws elastic benastalk dynamic environment
Set aws elastic benastalk dynamic environment

Time:10-30

Hi all now my spring boot app is running on aws eb docker platform, I want to set the dirfferent kafka consumer group id when creating a new instance by aws auto scaling(horizonal scaling).Is it possible? eg: like that instance one's kafka consumer group id = my-consume-group-1 , instance two's kafka consumer group id = my-consume-group-2,

because I need to create different consumer group id for kafka

I trying wit many ways but can't find

CodePudding user response:

In general, scaling of one app should be the same group. Then it'll read the same topics in parallel. Also with that approach, you shouldn't automatically scale based on CPU or memory, for example, because Kafka consumers can only scale up to the topic partitions amount. You should scale on consumer lag, instead (which would be a custom metric you need to expose from the app).

If you don't care about parallel consumption, then you can use a random UUID rather than needing anything specific to Beanstalk variables.

  • Related