Skip to content

[FEATURE] Support global resources support in multi-tenancy scenario #225

@zane-neo

Description

@zane-neo

Persona

OpenSearch(OS) cluster manager: The person who owns the OpenSearch cluster and provide OS capabilities to normal users.
Normal User(NU): The person who uses OpenSearch capabilities provided by OS cluster manager.

What

Global resources are resources that can be accessed by all tenants, OS cluster manager can configure these global resources in their own data storage(Remote cluster/DynamoDB etc) with their own pipeline(CDK/management portal etc). These global resources are usually system level metadata, e.g. connector, model, agents in ml-commons or templates in flow-framework, and they're tenancy agnostic.

Why

  1. With the global resources support we don't need to duplicate them in different tenants, saving storage resources for tenants.
  2. Global resources can be managed by OS cluster manger so they can provide consistent features across all tenants.
  3. Normal User doesn't have to be aware of global resources when they using the features provided by OS cluster.

How

Before an OpenSearch cluster spins up, OS cluster manager should configure all global resources first, all global resources will be attached with a global tenant id in data store. This global tenant id should also be configured into OS cluster settings when they starting the OpenSearch cluster.

There are two different cases should be handled in caching global resources:

  1. Existing resources get updated.
  2. New global resources are being added.

During the OS cluster nodes starting up, all the global resources will be fetched automatically and cached in cluster nodes memory, upon response(either success or failure), a scheduled task should be started to refresh the global resources cache with fixed interval, the task is to scan all the tables and fetch all global resources to cache. This approach can handle both cases above with a little bit latency, the interval should be a cluster setting configuration and customers can specify their own value.

When cache is not empty, read from cache first, if found return directly from cache. When cache is empty, read with actual tenant id from data store first, if not found, fallback to read with global tenant id from data store.

What solution would you like?

A clear and concise description of what you want to happen.

What alternatives have you considered?

A clear and concise description of any alternative solutions or features you've considered.

Do you have any additional context?

Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions