TIBCO BWCE Leveraging Consul for Service Discovery and Configuration Management

rsz bigstock 138686468 TIBCO BWCE Leveraging Consul for Service Discovery and Configuration Management

Cloud-native microservices require the adoption of new concepts and methodologies to be realized and operated successfully. See Microservices, Containers and Cloud-Native Architectures for Middleware to understand all the different concepts like containers, cloud-native architecture, DevOps, and their relation to building middleware microservices.

A key part of a modern microservices architecture is service discovery and configuration management. Two of the leading open source tools for this are Netflix’ Eureka and Consul (by Hashicorp). Both these services are already supported by TIBCO BusinessWorks Container Edition (BWCE). This post shows how to use BWCE in conjunction with Consul.

Consul for service discovery and configuration management

Consul is an open source tool for service discovery and configuration. Consul is distributed, highly available, and extremely scalable. The following description is copied from its Github website:

Consul provides several key features:

  • Service discovery—Consul makes it simple for services to register themselves and to discover other services via a DNS or HTTP interface. External services such as SaaS providers can be registered as well.
  • Health checking—Health checking enables Consul to quickly alert operators about any issues in a cluster. The integration with service discovery prevents routing traffic to unhealthy hosts and enables service-level circuit breakers.
  • Key/value storage—A flexible key/value store enables storing dynamic configuration, feature flagging, coordination, leader election, and more. The simple HTTP API makes it easy to use anywhere.
  • Multi-datacenter—Consul is built to be datacenter aware, and can support any number of regions without complex configuration.
  • Multi-platform—Consul runs on Linux, Mac OS X, FreeBSD, Solaris, and Windows.

Tutorial: BWCE leveraging Consul

BWCE supports Consul since release 2.1.0. You can leverage it to build resilient and fault-tolerant cloud-native applications and (micro)services. Only a few steps are required to use Consul for service discovery and configuration management with BWCE microservices.

First, configure service discovery in the HTTP resource template of your service:
under service TIBCO BWCE Leveraging Consul for Service Discovery and Configuration Management

The HTTP client resource of a consuming service is also configured using the service discovery capabilities, as seen here:under here TIBCO BWCE Leveraging Consul for Service Discovery and Configuration Management

The rest of the implementation of a BWCE service is not different to other services you might already have realized and deployed to Docker or Kubernetes. The benefit of the above configuration is that you leverage dynamic, cloud native service discovery and configuration features now.

A detailed step-by-step explanation including many screenshots can be found in TIBCO’s Community Wiki: Integration between BWCE and Consul for Service Discovery and Configuration Management. This example uses Docker to run Consul and the BWCE service in containers. Thanks to my colleague Alexandre Vazquez for writing this great tutorial.

Video: How to use BWCE and Consul with Docker and Kubernetes

I created a 20 minute video showing live how to leverage Consul with Docker and Kubernetes: TIBCO BusinessWorks Container Edition (BWCE) with Docker, Kubernetes and CloudFoundry.

If you have any questions or feedback, feel free to ask questions in our TIBCO Community Answers section.

Let’s block ads! (Why?)

The TIBCO Blog