MQTT over WebSockets
Another possibility is to use MQTT over WebSocket. This scenario is frequently used in IoT web application to display sensor data outputs in a time-series graphs, and so on. Also, this combination provides us the best of both worlds, such as utilizing the HTTP infrastructure for ports, security, and so on, in addition we can bring the Publish/Subscribe mechanism which is lacking in WebSockets but is the basis of MQTT. Also, MQTT provides a variety of quality services as well.
This combination lends itself well to a larger footprint device or gateway and still lacks the messaging interoperability, but can scale well to support many devices. Another possibility is to use WebSocket with other messaging infrastructures such as Kafka, which is a common pattern in large scale deployment and can scale well to support a large volume of data ingestion and large numbers of subscribers.