Hi
I can’t find answer and any comparisions to VerneMQ, Hive or EMQX. In which situations should I use my own MQTT broker instead of AWS IoT Core?
If you want to be responsible for the uptime of your own broker
There’s significant techspertise that you need with a scale engineering team to ensure it keeps working (DevOps, security patches, etc)
At hyperscale it’s worth it to run your own if you have sufficient dev team, at low scale it’s generally better to run AWS since it’s so cheap
At super low scale (classroom project) it becomes worth it to run your own again
It’s basically the same trade off as “should I use dynamodb or should I run everything on prem SQL”
I’m an AWS Solutions Architect, so I want to get that bias out of the way- I don’t want to come across as selling you on anything, but that’s sort of my default language.
Is there a specific reason you’re thinking of self-hosting?
If you have a very stable fleet size (don’t need to scale rapidly), don’t mind the occasional operational burden of running and maintaining your own hardware, and don’t mind shopping around for open source tools/building your own stuff, you could justify running your own MQTT broker. However, one of my most common engagements is moving people from self-hosted MQTT brokers to IoT Core because they don’t want to deal with that stuff anymore and they’d rather focus on their core business.
Here’s where it gets shill-y- but I want to explain:
AWS IoT Core is a ‘fully managed service’, so you don’t have to worry about the operational burden of running your own MQTT broker. You don’t need to provision new hardware to handle increased load, you don’t need to update the operating system with new security patches, etc. That’s all handled for you- you just connect to an endpoint and go. The single endpoint will scale from your first device to well past your millionth.
There are also a bunch of features built on top of the IoT Core broker that can make your life easier- Rules Engine for routing data to other AWS services, Device Registry for keeping track of your fleet of devices, Device Defender for auditing your fleet to check for security issues, etc.
I agree with most of this except the classroom-scale projects - if anything, those are perfect for managed/serverless/pay-as-you-go services because they’re basically free. Even the cheapest EC2 instance costs a couple of dollars a month, which is always going to be more than the couple of cents you’d pay for IOT, DDB, S3 etc at super low scale.
Obviously that doesn’t apply to the more “provisioned” services like RDS or NATGW though, those are relatively more pricey at super-low scale.
If you want to be tied to a proprietary broker (not fully standard), then use AWS, Azure, Google or any of the other “platforms”.
If you want full MQTT standard compliance, MQTT 5 compatibility, use your own.
The concerns about “hardware” maintenance are FUD, you can deploy your own MQTT broker on the cloud, fully scalable, load balanced, etc.
In either case, you WILL want to evaluate features, performance, scalability, etc.
Thank you for reply.
What do you mean in terms of mqtt compliance? Do you have some comparisons?
This literally took me a minute to google, probably less than you asking the question.
https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-differences
https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support
“IoT Hub is not a full-featured MQTT broker and does not support all the behaviors specified in the MQTT v3.1.1 standard.”
The rest you can search.
Thanks