Architecture and Components

Prev Next

Rocket.Chat's architecture is a comprehensive, multi-component system designed for robustness, flexibility, and scalability. The separate components (modules) can function independently but are designed to work together. For instance, organizations can integrate specific modules like video conferencing or file-sharing functionalities based on their needs, ensuring a customized and efficient communication platform.

Based on a client-server model, the server component is written in JavaScript using Node.js and uses MongoDB for data storage. This architecture ensures high performance and real-time communication, making it suitable for various use cases, whether deployed on-premises or in the cloud. For example, businesses can deploy Rocket.Chat to facilitate seamless real-time collaboration across different departments, and customer support teams can leverage Rocket.Chat to provide instant assistance to clients, ensuring prompt resolution of queries.

This document describes the architectural components for our Premium plans, Community workspaces, and standard components across all plans.


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 organizations with complex use cases, focusing on scalability, reliability, and ease of maintenance.

Refer to the official guide for a comprehensive overview of the premium plans.

Premium plan architecture

Server (Rocket.Chat Monolith/Microservices)

A Rocket.Chat workspace can be deployed as a Monolith, with multiple nodes working together, or as a Microservices architecture.

  • In the Microservices approach, each system component operates independently and offers several advantages, such as enhanced scalability, load balancing, and high availability.

  • Additionally, the microservices architecture allows individual components to be updated or replaced without impacting the entire system.

  • This makes it an ideal solution for businesses, educational institutions, and customer support teams that require robust, scalable, and easily maintainable communication platforms.

Apps, integrations, and bridges

Rocket.Chat is designed to be extensible and interoperable.

  • Apps are developed using Apps-Engine, which interfaces with the Rocket.Chat server. Examples include the WhatsApp app and Google Calendar app.

  • You can also install external apps in your workspace from the Rocket.Chat Marketplace.

  • Integrations allow for the incorporation of other external systems and services using APIs and webhooks.

  • Bridge services seamlessly transmit data and conversations between different platforms or protocols. Rocket.Chat currently supports bridging with the Matrix protocol.

Storage

  • Files such as assets, user files, images, and other media files can be stored locally on the server's system or over network services like Amazon S3 and WebDAV.

  • You can also configure allowed and blocked file types in your workspaces.

  • This layered approach to data storage ensures efficient data management.

See the standard architecture section for details about other common components.


Rocket.Chat Community workspace architecture

Community plan architecture 

Server

  • A Rocket.Chat Community workspace can be deployed as a monolith, where a central processing unit manages logic and computation, user accounts, message storage, and communication with other components. This unified structure ensures the system's smooth operation by handling all essential functions in a single entity.

  • This deployment type ensures consistent performance and reliability, making it an ideal choice for organizations that prefer a straightforward and cohesive communication platform.

Refer to the standard architecture section for information on the remaining components.


Standard architecture (Premium and Community)

Reverse proxy

The use of a server proxy in Rocket.Chat adds an extra layer of security and efficiency to workspaces on any of Rocket.Chat's premium plans.

  • The server proxy acts as an intermediary for client requests seeking resources from other servers. It enhances functionality by providing load balancing, caching, and security checks.

  • For instance, in a large enterprise with heavy communication traffic, the server proxy can distribute the load evenly across multiple servers, ensuring smooth and efficient operation. It can also cache frequently accessed data, speeding up response times and improving user experience.

  • Additionally, the server proxy helps protect the system from potential attacks by filtering out malicious requests. This added security layer is particularly valuable for organizations handling sensitive information, such as healthcare providers, ensuring that their communications remain secure and reliable.

Role-based access control

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

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 and streamlined user management.

Database

Rocket.Chat uses MongoDB as a database to store all chat messages, user information, and other system configurations and related data.

Clients

Rocket.Chat clients provide users with an interface on the web, desktop, or mobile application.

  • Since all functionalities are mainly exposed via REST APIs and WebSockets, integrating Rocket.Chat into your own user experience (UX) is straightforward.

  • This multi-platform design ensures that users can access the chat application from virtually any device, whether on a computer at work, a smartphone on the go, or a tablet at home. This flexibility makes Rocket.Chat an ideal solution for organizations needing consistent and accessible communication tools across different devices and environments.

Push notifications

Push notifications are integral to real-time communication platforms.

  • Rocket.Chat's premium plans offer workspaces with unlimited secure push notifications, ensuring users receive timely alerts. These notifications are delivered to mobile devices via a cloud push notification gateway, facilitating real-time communication.

  • For example, in team collaborations, members are immediately informed about critical updates or mentions, ensuring they stay engaged and informed.

  • SMTP and email notifications can also be configured. This means that users can receive notifications through traditional email channels, ensuring they never miss critical updates even if they are not connected to the app.

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.

Change streams

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.

Apps-Engine

The Rocket.Chat Apps-Engine framework enables users to create and host custom apps for Rocket.Chat, providing a tailored communication experience. This flexibility allows organizations to customize and enhance Rocket.Chat’s capabilities to meet their specific needs.

Matrix protocol integration

Rocket.Chat supports federation using the Matrix protocol, 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, enabling seamless communication between diverse systems.


This architecture demonstrates Rocket.Chat as a seamless and secure chat solution, designed for versatility and robustness. It accommodates various platforms, integrates with multiple protocols and systems, and helps you manage data effectively.