Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Add support for external bridges #3150

Closed
9 tasks done
lulf opened this issue Sep 3, 2019 · 5 comments
Closed
9 tasks done

Add support for external bridges #3150

lulf opened this issue Sep 3, 2019 · 5 comments
Assignees

Comments

@lulf
Copy link
Member

lulf commented Sep 3, 2019

Overview

A feature requested by several users is the ability to connect address spaces to external AMQP endpoints. NOTE: this proposal does not cover bridging between address spaces on the same cluster.

The use cases covered by this proposal are:

  1. Forwarding messages from a local queue in a local address space to a destination on a remote AMQP endpoint
  2. Forwarding messages to a local queue in a local address space from a destination on a remote AMQP endpoint
  3. Sending messages to a remote AMQP endpoint via a local address space - by creating a connector and using prefixing
  4. Receiving messages from a remote AMQP endpoint via a local address space - by creating a connector and using prefixing

The external bridging feature requires a dispatch router to support the above use cases. This means that this feature will only be available in the standard address space to start off with, but may be implemented in the brokered address space as well by adding a router to handle the bridging.

Design

External Bridging Design Doc

Tasklist

  • Dynamically create and update router configuration independently of the template in address-space-controller
  • Add connectors and address config to router config based on address space config
  • Update address space status based on connector status
  • Report connector metrics in address space controller prometheus endpoint
  • Validate connectors in api-server when creating address space
  • Validate forwarders in api-server when creating addresses
  • Create/update router linkroutes based on addresses in agent
  • Update address status based on forwarder status in standard-controller
  • Report forwarder metrics on standard controller prometheus endpoint
lulf pushed a commit that referenced this issue Sep 3, 2019
* Proposal  on bridging to external endpoints

Issue #3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 4, 2019
* Generate router config model identical to what was stored in template
* Add support for (de)serializing router config to JSON
* Remove router config from template

Issue EnMasseProject#3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 5, 2019
* Generate router config model identical to what was stored in template
* Add support for (de)serializing router config to JSON
* Remove router config from template
* Add controller for reconciling router config
* Use upstream image from interconnected cloud rather than building our own (removes router module)
* Add better description of address pattern

Issue EnMasseProject#3150
lulf pushed a commit that referenced this issue Sep 7, 2019
* Reconcile router config

* Generate router config model identical to what was stored in template
* Add support for (de)serializing router config to JSON
* Remove router config from template
* Add controller for reconciling router config
* Use upstream image from interconnected cloud rather than building our own (removes router module)
* Add better description of address pattern

Issue #3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 9, 2019
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 9, 2019
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 9, 2019
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 9, 2019
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 9, 2019
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 10, 2019
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 10, 2019
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 10, 2019
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 10, 2019
* Refactor and move router status collection into amqp-utils
* Add controller in address-space-controller for checking the router
status by querying all routers for an address space looking for the
connector and verifying its state.

Issue EnMasseProject#3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 10, 2019
* Count number of ready, notready and total connectors

Issue EnMasseProject#3150
lulf pushed a commit that referenced this issue Sep 10, 2019
* Add model classes for connector
* Add reconiliation of address space connectors

Issue #3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 10, 2019
* Refactor and move router status collection into amqp-utils
* Add controller in address-space-controller for checking the router
status by querying all routers for an address space looking for the
connector and verifying its state.

Issue EnMasseProject#3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 10, 2019
* Count number of ready, notready and total connectors

Issue EnMasseProject#3150
lulf pushed a commit that referenced this issue Sep 11, 2019
* Add router status collector

* Refactor and move router status collection into amqp-utils
* Add controller in address-space-controller for checking the router
status by querying all routers for an address space looking for the
connector and verifying its state.

Issue #3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 11, 2019
* Count number of ready, notready and total connectors

Issue EnMasseProject#3150
@lulf
Copy link
Member Author

lulf commented Sep 11, 2019

@rgodfrey @k-wall

Regarding bridging and forwarding, I believe we have 2 options for the implementation:

  1. Message routing based forwarding (original proposal): Create a pair of autolinks to set up forwarding. 1 autolink that is configured on the remote connector, and 1 autoLink that is configured for the local queue/broker(s). This means that you have 1 link from each router to the remote endpoint, and 1 link per queue shard to one of the routers.

  2. Link routing based forwarding: Create another connector from broker to router with source/target set to the remote address so that it is link-routed (already configured) to the external endpoint. This means you get only 1 link to the remote endpoint (or, 1 for each shard of a queue). We also know that link routing has better performance fwiw.

@grs
Copy link
Member

grs commented Sep 11, 2019

How does option 2. work? What triggers the link?

@lulf
Copy link
Member Author

lulf commented Sep 11, 2019

(As we discussed in chat, just mentioning here for reference) In option 2, the broker creates the link using the remote address, thereby triggering the linkroute.

lulf pushed a commit to lulf/enmasse that referenced this issue Sep 11, 2019
* Rename Status to AddressStatus
* Update design doc
* Add model classes for forwarder

Issue EnMasseProject#3150
lulf pushed a commit that referenced this issue Sep 12, 2019
* Count number of ready, notready and total connectors

Issue #3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 12, 2019
* Rename Status to AddressStatus
* Update design doc
* Add model classes for forwarder

Issue EnMasseProject#3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 12, 2019
* Rename Status to AddressStatus
* Update design doc
* Add model classes for forwarder

Issue EnMasseProject#3150
lulf pushed a commit that referenced this issue Sep 12, 2019
* Doc: Update design doc
* Model: Add classes for forwarder spec and status
* Broker AMQP Connector: Add support for creating links in both directions
* Agent: Add support for creating broker -> router connectors + links based on forwarder definitions
* Standard Controller: Collect forwarder status from routers and report metrics on the number of forwarders in ready vs not ready state.
* Other: Rename Status to AddressStatus

Issue #3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 12, 2019
* Doc: Update design doc
* Model: Add classes for forwarder spec and status
* Broker AMQP Connector: Add support for creating links in both directions
* Agent: Add support for creating broker -> router connectors + links based on forwarder definitions
* Standard Controller: Collect forwarder status from routers and report metrics on the number of forwarders in ready vs not ready state.
* Other: Rename Status to AddressStatus

Issue EnMasseProject#3150
@lulf
Copy link
Member Author

lulf commented Sep 12, 2019

Notes to self.

Validation TODO:

  • Sanity check on connector names
  • Sanity check on connector address pattern
  • Sanitize connector name to filesystem path in address space controller router config generator
  • Sanity check on forwarder names
  • Sanity check on forwarder remoteAddress (valid AMQP address)
  • Sanity check on remoteAddress prefixed with a valid connector name
  • Check that there is no cycle amongst forwarders.
  • Sanity check on forwarder allowed only for queue and subscription address types, and only out direction for subscription

Other potential improvements:

  • Allow both pattern and prefix for the connector addresses list to expose these distinct way to match addresses
  • Reference documentation and examples

@lulf lulf self-assigned this Sep 12, 2019
@lulf lulf added the 0.30.0 label Sep 12, 2019
lulf pushed a commit that referenced this issue Sep 16, 2019
* Add support for address forwarding to standard address space

* Doc: Update design doc
* Model: Add classes for forwarder spec and status
* Broker AMQP Connector: Add support for creating links in both directions
* Agent: Add support for creating broker -> router connectors + links based on forwarder definitions
* Standard Controller: Collect forwarder status from routers and report metrics on the number of forwarders in ready vs not ready state.
* Other: Rename Status to AddressStatus

Issue #3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 16, 2019
* Rename field names for statuses
* Validate connector names and address patterns
* Validate forwarder remoteAddress connector reference
* Validate forwarder address type

Issue EnMasseProject#3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 16, 2019
* Rename field names for statuses
* Validate connector names and address patterns
* Validate forwarder remoteAddress connector reference
* Validate forwarder address type

Issue EnMasseProject#3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 17, 2019
* Rename field names for statuses
* Validate connector names and address patterns
* Validate forwarder remoteAddress connector reference
* Validate forwarder address type

Issue EnMasseProject#3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 17, 2019
* Rename field names for statuses
* Validate connector names and address patterns
* Validate forwarder remoteAddress connector reference
* Validate forwarder address type

Issue EnMasseProject#3150
lulf pushed a commit that referenced this issue Sep 17, 2019
* Add validation of model

* Rename field names for statuses
* Validate connector names and address patterns
* Validate forwarder remoteAddress connector reference
* Validate forwarder address type

Issue #3150
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 20, 2019
lulf pushed a commit to lulf/enmasse that referenced this issue Sep 23, 2019
lulf pushed a commit that referenced this issue Sep 23, 2019
* Apply router changes only once

Issue #3150

* Couple of fixes...

* Fix missing label

* Add debug logging and fix volume attach

* Fix non-TLS case

* Fix TLS
lulf pushed a commit that referenced this issue Sep 23, 2019
* Add ConnectorsTest.testConnectorTLS
* Some fixes to non-TLS and TLS tests
* Create and use external router for remote client, and always use TLS
* Update broker.xml with queue names now that it is no longer
autogenerated
* Generate broker truststore via p12 store and use valid CN
* Apply router changes only once

Issue #3150
@lulf
Copy link
Member Author

lulf commented Sep 27, 2019

@famartinrh A couple of additional test cases we should verify:

  • Use valueFromSecret for certs for instance to ensure this works
  • Configure a queue in broker with low memory limit and fill it up. Then test that messages can be fetched via an address '!!GLOBAL_DLQ' on the local broker.

@lulf lulf closed this as completed Oct 15, 2019
lulf pushed a commit to lulf/enmasse that referenced this issue Oct 28, 2019
* Add router status collector

* Refactor and move router status collection into amqp-utils
* Add controller in address-space-controller for checking the router
status by querying all routers for an address space looking for the
connector and verifying its state.

Issue EnMasseProject#3150
lulf pushed a commit that referenced this issue Oct 28, 2019
* Add router status collector

* Refactor and move router status collection into amqp-utils
* Add controller in address-space-controller for checking the router
status by querying all routers for an address space looking for the
connector and verifying its state.

Issue #3150
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants