How to achieve multi-tenancy in the context of Kafka and storm?

前端 未结 3 1789
我在风中等你
我在风中等你 2021-02-19 22:26

What are the best practices, for building a multi-tenant app in the context of Kafka and storm?

For example: creating topic for each tenant and consume multi-topics spo

3条回答
  •  离开以前
    2021-02-19 23:18

    I think that topic for each tenant is the right choice.

    The naming convention might be something like this: topic_base_name_tenant_id.

    The reasons are:

    1. It allows flexible configuration for each tenant (like @Sebastian mentioned earlier).
    2. Clearer logical separation.

    Now let's say that we will use different approach. For example, partition for each tenant. It might be problematic, since:

    1. You are limiting the parallelism level to the number of tenants.
    2. Adding new tenants, results adding new partition → republish old messages (The default partitioning algorithm is: message_key % partition_size).

提交回复
热议问题