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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠