Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance analysis of cascade operations #660

Open
3 tasks
Tracked by #27434
AlexRuiz7 opened this issue Jan 29, 2025 · 0 comments
Open
3 tasks
Tracked by #27434

Performance analysis of cascade operations #660

AlexRuiz7 opened this issue Jan 29, 2025 · 0 comments
Assignees
Labels
level/task Task issue mvp Minimum Viable Product type/research Research issue

Comments

@AlexRuiz7
Copy link
Member

AlexRuiz7 commented Jan 29, 2025

Description

As a preliminary step towards migrating Wazuh's RBAC from the Server to the Indexer, we need to be aware about the performance of the Indexer on cascade operations involving the change of agents' groups.

A single agent can generate hundreds to thousands of events that end up on indexes. These documents (events) are tied to a single agent, comprising a one-to-one relationship, meaning that a document in an index can only belong to an agent. In order to depict this relationship in the indices, every document contains the agent.id as a primary key that allows these entities to be correlated. Every document also has the field agent.groups to:

  • allow groups-based queries over the documents.
  • allow filtering the document based on RBAC (roles that can read specific groups of agents only).

The main drawback of this design is that when any agent changes its groups, all the data belonging to that agent until that moment needs to be updated with the new groups of the agent.

To better understand the problem, let's imagine an environment with 50K agents, 10K documents per agent and day, over 30 days.

n_docs = 50.000 * 10.000 * 30 = 15.000.000.000 documents

Over a month, such an environment would have 15K million documents. On a hypothetical, but possible, update of every agent's group, the Indexer would need to perform 15K million update operations as a result.

Environment details

  • Comprised by 50K agents.
  • Agents distribution by OS:
    • 50% Windows
    • 15% macOS
    • 35% Linux
  • Number of groups per agent: 128

Plan

  • Simulate the environment.
  • Simulate an update on every agent's group (worst case scenario).
  • Measure performance of the Indexer during the update of the documents.
@AlexRuiz7 AlexRuiz7 added level/task Task issue type/research Research issue labels Jan 29, 2025
@AlexRuiz7 AlexRuiz7 changed the title Performance analysis for cascade operations on data heavy environments Performance analysis of cascade operations Jan 29, 2025
@wazuhci wazuhci moved this to Backlog in XDR+SIEM/Release 5.0.0 Jan 29, 2025
@AlexRuiz7 AlexRuiz7 added the mvp Minimum Viable Product label Jan 29, 2025
@wazuhci wazuhci moved this from Backlog to In progress in XDR+SIEM/Release 5.0.0 Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue mvp Minimum Viable Product type/research Research issue
Projects
Status: In progress
Development

No branches or pull requests

2 participants