Is there a hard limit on number of rules on an event bus?

0

I would like to create an event bus rule for every user that signs up for my app. Every user will have an IoT MQTT connection and it would be nice to use event bus to route messages to individual users' connection based on a rule specific to them.

The default of 300 will not be enough in production. Wondering if there's an upper limit and I need to rethink the architecture.

3回答
2
承認された回答

EventBridge has a hard limit of 2000 rules of any given EventBus today.

profile pictureAWS
回答済み 4ヶ月前
profile pictureAWS
エキスパート
レビュー済み 4ヶ月前
1

Hi,

You should not have an individual rule for each different MQTT connection. You should rather have a single rule for all connections triggering 1 single Lambda. This Lambda will then use a lookup table (redis cache or DDB table) to match the connection to a user and then be able to route the MQTT messages to the user.

Parallelism will be managed for you by Lambda runtime: you'll get a new independent instance of your function for each incoming message.

Best,

Didier

profile pictureAWS
エキスパート
回答済み 4ヶ月前
  • I know that's what we are supposed to do, but one less component I have to run is all the better. Also, I'd really prefer to only pay for that message one time (through event bus) rather than twice (event bus + lambda).

  • Hi, thanks for the feedback; if you can cope with the 2'000 rules limit, it's fine. I understand the point re. additional cost of Lambda. I feel that it would bring you additional flexibility that you won't have with EventBridge only. Happy that you found the right solution for your use case!

0

Personally, Im not sure of the answer but It sounds like eventbridge is the wrong product for what your trying to achieve because creating an event bridge rule for every user just doesnt seem to scale to me and will be unmanageable. I would re-evaluate the method and what your trying to achieve.

I would only use eventbridge for routing events between services and not down to a low level such as users.

How about using permissions in MQTT where your devices can only subscribe to their own topic and then your application can publish to which ever topic you need to send to users? Route messages say to a lambda function and it will publish to the correct Topic?

profile picture
エキスパート
回答済み 4ヶ月前
  • Intresting this answer for marked down. Though with the answer being a limit of 2000, I stick with my thoughts that using event bus for routing rules for to users doesn’t scale. 2000 max rules would mean you can’t have anymore users than 2000.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ