Skip to content

Polices On Topic #2688

Closed
Closed

Description

@codelipenghui

This is the master ticket for tracking all the tasks for polices on topic

Activity

  1. added this to the 2.3.0 milestone on Oct 1, 2018
  2. added
    type/feature
    and removed on Oct 1, 2018
  3. ivankelly commented on Oct 5, 2018

    @ivankelly
    Contributor

    @codelipenghui

    This change will cause more load on zookeeper. For each topic loaded, we would have to do a read for the policy of that topic when loading the topic policy, even if no topic policy exists.

    How does the broker get notified of updated to the policy for a topic? If we add a watcher, that's a watcher per topic. We should consider if there's another way of doing this without placing more load on ZK, such as in a 'system' topic.

  4. codelipenghui commented on Oct 23, 2018

    @codelipenghui
    ContributorAuthor

    @ivankelly

    This change will cause more load on zookeeper. For each topic loaded, we would have to do a read for the policy of that topic when loading the topic policy, even if no topic policy exists.

    How does the broker get notified of updated to the policy for a topic? If we add a watcher, that's a watcher per topic. We should consider if there's another way of doing this without placing more load on ZK, such as in a 'system' topic.

    Yes, this is a very necessary concern. I think 'system' topic is an excellent solution.

    1. For policy changed, send message to the 'system' topic and write to zookeeper, then 'system' topic consumer update policy cache in broker. So that just need to read the cache.
    2. For topic owner changed, load the namespace policy and topic policy into broker cache.

    For 'system' topic design. I'm not sure the 'system' topic border.

    1. A 'system' topic in a cluster
    2. Namespace 'system' topic / Topic 'system' topic
    3. 'system' topic for each namespace / 'system' topic for each topic

    I'm prone to 1 or 2, for 3 too much topic will be created.

    @ivankelly Can you give me some idea more ? Thanks

  5. ivankelly commented on Oct 23, 2018

    @ivankelly
    Contributor

    I would put it at the namespace level, so 2. It would be good to have a generic model for system topics, as currently it would require you wiring up something yourself. Maybe it would be better to put it at the managed ledger layer also, since if we put it at the pulsar level we would have a circular dependency of sorts.

  6. sijie commented on Oct 23, 2018

    @sijie
    Member

    @ivankelly I am a bit confused about using managed ledger. managed ledger doesn't have tailing facility, how do you propagate the policy changes using managed ledger?

  7. ivankelly commented on Oct 23, 2018

    @ivankelly
    Contributor

    You shouldn't need to propagate. When you update the policy, you're hitting the broker that owns the topic.

  8. sijie commented on Oct 23, 2018

    @sijie
    Member

    @ivankelly

    How does the broker get notified of updated to the policy for a topic? If we add a watcher, that's a watcher per topic.

    You shouldn't need to propagate. When you update the policy, you're hitting the broker that owns the topic.

    I am lost now. Isn't the existence of system topic to address the concern of zookeeper notifications? so we convert the zookeeper notifications, to consume from system topic. penghui's previous comment was using system topic, which is making sense, since pulsar already has producer and consumer. but in your last comment, you suggest using mledger to avoid circular dependency, then my question is "how is possible that the other brokers get notified with policy changes, because mledger doesn't have tailing facility".

  9. ivankelly commented on Oct 23, 2018

    @ivankelly
    Contributor

    Isn't the existence of system topic to address the concern of zookeeper notifications

    From what I can tell, system topics don't actually exist as an actual concept in pulsar, they're just normal topics. But as a conceptual concept, they don't exist just to replace notifications. They also exist as a place to store metadata which can scale.

    Ok, so, to recap where the suggestion to use managed ledger came from...

    The first suggestion was to put topic policies in zookeeper. This was discarded because of zookeeper scale issues.

    So then it was suggested to use a system topic in pulsar. I'm questioning whether we should use a topic for policies on topics. What happens if the topic that contains the policy so has a topic policy? Maybe we need to prevent system topics from having topic level policies.

    Otherwise, we put the "system topics" a lower layer and we wouldn't even have this problem. I suggested managed ledger, but dlog would also work here if we want notifications.

    But stepping back, what I really want is that we define what system topics are and make them a reusable concept within the system.

  10. 29 remaining items

  11. codelipenghui commented on Nov 4, 2020

    @codelipenghui
    ContributorAuthor

    All topic policies are ready for 2.7.0. Thanks to all contributors work together to complete the great feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/brokerarea/clitype/feature

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions