Architecture and Components

Rocket.Chat's architecture is a comprehensive, multi-component system designed for robustness, flexibility, and scalability. It is based on a client-server model, with the server component written in JavaScript using Node.js and MongoDB for data storage. This architecture is designed for scalability, high performance, and real-time communication, making it suitable for many use cases, whether deployed on-premise or on the cloud. Rocket.Chat is modular, which comprises separate components (modules) that can function independently but are designed to work together. This modular design enhances the flexibility and scalability of the application.

Rocket.Chat Premium Plan Architecture

Rocket.Chat's premium plans offer an advanced, scalable solution that extends the capabilities of the community workspace. It is specifically designed to cater to the needs of larger organizations and complex use cases, focusing on scalability, reliability, and ease of maintenance. Kindly refer to the official guide for a comprehensive overview of these premium plans.

  1. Server (Rocket.Chat Monolith/Microservices): A Rocket.Chat workspace can be deployed as either a Monolith, with multiple nodes working together, or using a Microservices architecture. The Microservices approach offers advantages such as enhanced scalability, load balancing, and high availability. Each system component operates independently, allowing for easier scaling and maintenance. Updates can be made to individual components without impacting the entire system, ensuring flexibility and reliability for Rocket.Chat deployments.

  2. Clients: Rocket.Chat clients provide users with an interface on the web, desktop, or mobile application, connecting with the server mainly through HTTP requests and Websockets. As all functionalities are exposed by REST APIs and websockets, it's possible to integrate the chat in your own UX easily. This multi-platform design ensures that users can access the chat application virtually from any device.

  3. Push Notifications: Push notifications are integral for real-time communication platforms. Rocket.Chat's premium plans offer workspaces with unlimited secure push notifications. These notifications are delivered to mobile devices via a cloud push notification gateway, ensuring real-time communication. Additionally, SMTP and email notifications can be configured, providing users with flexible notification options.

  4. Reverse Proxy: The use of a server proxy in Rocket.Chat adds an extra layer of security and efficiency to workspaces on any Rocket.Chat's premium plan. The server proxy is an intermediary for client requests seeking resources from other servers. It can provide functionalities such as load balancing, caching, and security checks. This optimizes the data flow and helps protect the system from potential attacks by filtering out malicious requests.

  5. Apps, Integrations, and Bridges: Rocket.Chat is designed to be extensible and interoperable. Apps are developed using the Apps Engine, which interfaces with the Rocket.Chat server. Examples include the WhatsApp app and Google Calendar app. Integrations allow for incorporating other external systems and services using APIs and webhooks. Bridge services provide a way of seamlessly transmitting data and conversation with different conversational platforms or protocols. Rocket.Chat currently supports bridging with the Matrix protocol.

  6. Matrix Protocol Integration: Rocket.Chat supports federation using the Matrix protocol, which is an open standard for interoperable, decentralized, real-time communication. This integration allows Rocket.Chat to transmit data and conversations across different platforms on the Matrix protocol.

  7. Permission Management: Rocket.Chat has components for managing user permissions. This is crucial for access control within the chat application, ensuring users can only access the features and data they are authorized to use.

  8. Apps Engine: The Rocket.Chat Apps Engine is a framework that allows users to create and host custom apps for Rocket.Chat.

  9. Reactivity (OpLog) Layer: Rocket.Chat features a reactivity layer, which ensures real-time data updates in the system. This is crucial for a real-time chat application like Rocket.Chat, ensuring that users see the most up-to-date information in their chat interfaces.

  10. WebSocket: Rocket.Chat uses the WebSocket protocol to enable real-time communication between the client and server. The WebSocket protocol is a high-performance, bi-directional communication protocol that enables instant data transfer, essential for a real-time chat application.

  11. Database and Storage: Rocket.Chat uses MongoDB as a database to store all chat messages, user information, and other system configurations and related data. Files like assets, user files, images, and other media files are stored locally on the system running the server or over network services like Amazon S3, and WebDAV. This layered approach to data storage ensures efficient management of data.

  12. Authentication and Authorization: User authentication, authorization, and access control can be managed using open standard protocols like OAuth, SAML, and LDAP. This integration with multiple authentication protocols ensures secure user login processes.

Rocket.Chat Community Plan Architecture

  1. Server: A Rocket.Chat workspace can be deployed as monolith, managing the logic and computation, user accounts, message storage, and communication with other components. This central processing unit interacts with all other components, ensuring the system's smooth operation.

  2. Clients: Rocket.Chat clients provide users with an interface on the web, desktop, or mobile application, connecting with the server mainly through HTTP requests and Websockets. This multi-platform design ensures that users can access the chat application virtually from any device.

  3. Push Notifications: Push notifications are sent to mobile devices through a cloud push notification gateway, ensuring real-time communication. SMTP and email notifications can also be configured, providing flexibility in how users receive notifications.

  4. WebSocket: Rocket.Chat uses the WebSocket protocol to enable real-time communication between the client and server. The WebSocket protocol is a high-performance, bi-directional communication protocol that enables instant data transfer, essential for a real-time chat application.

  5. Reverse Proxy: Rocket.Chat uses a reverse proxy for load balancing or caching purposes. This helps optimize the application's performance, ensuring smooth and efficient operation even under heavy load.

  6. Reactivity (OpLog) Layer: Rocket.Chat features a reactivity layer, which ensures real-time data updates in the system. This is crucial for a real-time chat application like Rocket.Chat, ensuring that users see the most recent information in their chat interfaces.

  7. Permission Management: Rocket.Chat has components for managing user permissions. This is crucial for access control within the chat application, ensuring that users can only access the features and data they are authorized to use.

  8. Apps Engine: The Rocket.Chat Apps Engine is a framework that allows users to create and host custom apps for Rocket.Chat.

  9. Database and Storage: Rocket.Chat uses MongoDB as a database to store all chat messages, user information, and other system configurations and related data. Files like assets, user files, images, and other media files are stored locally on the system running the server or over network services like Amazon S3, and WebDAV. This layered approach to data storage ensures efficient management of data.

  10. Authentication and Authorization: User authentication, authorization, and access control can be managed using open standard protocols like OAuth and SAML. This integration with multiple authentication protocols ensures secure user login processes.

The Rocket.Chat architecture is a testament to its resourcefulness as a chat solution. It accommodates various platforms, integrates with multiple protocols and systems, and effectively manages data, ensuring a seamless and efficient chat experience for its users.

Last updated

Rocket.Chat versions receive support for six months after release.