SlideShare a Scribd company logo
Microservice Bus Tutorial
Huabing Zhao, PTL of MSB Project, ZTE
2
Agenda
MSB Overview
Service Registration
Service Discovery
Example & Demo
Suggested Integration Approach
Future plan
3
MSB Overview-Introduction
Microservices Bus(MSB) provide a reliable, resilient and scalable
communication and governance infrastructure to support Microservice
Architecture including including service registration/discovery, external
API gateway, internal API gateway, client SDK. It's a pluggable
architecture so it can integrate with auth service provider to provide
centralized Authentication & Authorization. MSB also provides a service
portal to manage the REST APIs.
MSB doesn’t depend on a specific environment. It can work in bare metal,
virtual machine or containerized environment.
4
MSB Overview-Functionalities
CircuitBreaker
Transformation
RateLimiting
Flowtagging
Authentication
Service requests statistics and analysis
Pluggable Architecture
OtherPlug-in…
Service Registration
Service Discovery
Service Change
Notification
Service Status Change
Notification
TCP/UDP Forwarding
HTTP/HTTPS Forwarding
WEB Socket Forwarding
Route dynamically update
FTP Forwarding
Service Healthy Check
Service Registration Load Balancing API Gateway
5
MSB Overview-Components
• Registry
Service information storage, MSB uses Consul as the service registry.
• MSB Discovery
Provides REST APIs for service discovery and registration
• API Gateway
Provide service request routing, load balancing and service governance. It can be deployed as
external Gateway or Internal Gateway.
• MSB SDK
Java SDK for point to point communication
MSB
MSB
Discovery
External service Internal service
External Gateway Internal Gateway
Registry
ONAP Microservices
Microservice A
Microservice B
Microservice C
MSB SDK
1 Service discovery
2 Service request
1 Service request
2 Route request to service provider
Desktop External SystemsMobile
External service request
MSB
Discovery
External Gateway Internal Gateway
6
Service Registration-Information Model
Attribute Description
serviceName Service Name
version Service Version
url the actual URL of the service to be registered
protocol supported protocols: 'REST', 'UI', 'HTTP','TCP'
visualRange Visibility of the service.
External(can be accessed by external systems):0
Internal(can only be accessed by ONAP microservices):1
path The customized publish path of this service.
If path parameter is specified when registering the service, the service will
be published to api gateway under this path. Otherwise, the service will
be published to api gateway using a fixed format: api/{serviceName}
/{version}.
The customized publish path should only be used for back-compatible.
lb_policy Load balancing method, Currently two LB methods are supported, round-
robin and ip-hash.
enable_ssl True if the registered service is based on https.
False if the registered service is based on http.
nodes ip: the ip of theservice instance node
port: the port of the service instance node
ttl: time to live, this parameter is reserved for later use
7
Service Registration-RESTFul API
http method: POST
url: http://{msb_ip}:{msb_port}/api/microservices/v1/services
Example:
curl -X POST 
-H "Content-Type: application/json" 
-d '{"serviceName": "test", "version": "v1", "url": "/","protocol": "REST", "lb_policy":"round-robin","nodes": [
{"ip": "127.0.0.1","port": "9090"}]}' 
"http://127.0.0.1:10081/api/microservices/v1/services”
8
Service Registration-MSB SDK
Microservices can use MSB SDK to register themselves to MSB.
MSB
ONAP
Microservice
MSB SDK
REST API
9
Service Registration-Kube2msb Registrator
MSB
MSB
Discovery
External service Internal service
External Gateway Internal Gateway
Registry
ONAP Operations Manager
ONAP
A&AI
Kube2msb registrator
Kube2msb registrator can register service endpoints for the microservices deployed by OOM
• OOM(Kubernetes) deploy/start/stop ONAP components.
• Registrator watches the kubernetes pod event .
• Registrator registers service endpoint info to MSB. It also updates the service info to MSB
when ONAP components are stopped/restarted/scaled by OOM
1 Pod Even (Start, Stop etc.)
Policy
SDC
SO
VF-CVF-C
2 Register Service
Update Service
k8s
deployment
specs
(annotation)
10
Kube2msb Registrator-Service configuration
Use Kubernetes annotations to attach service endpoint metadata to objects.
Service endpoint can be defined at Pod level or Service level
Pod level: leverage the LB capabilities of MSB to distribute requests to multiple pods
Service level: MSB send the request to service(Cluster IP), K8s dispatch the request to the backend Pod
Pod
Pod
Service MSB
Register
Pod
Pod
MSBRegister
Register at service level
Register at pod level
11
Kube2msb Registrator-flow chart
12
Service Discovery-Server Side Discovery
Service
Registry
Micorservice
(Consumer)
Router
Micorservice
Instance A
10.74.215.33:3564
10.74.215.211:1522
10.74.215.8:3281
Invoke
Load balance &
invoke
Query
ONAP
Register
Micorservice
Instance B
Micorservice
Instance C
•Compared to client-side discovery, the client code is simpler since it does not have to deal with discovery. Instead, a client
simply makes a request to the router.
•One more network hop is required than when using client-side discovery
Example: Curl http://msb_ip:msb_port/api/sdc/v1/catalog/resources
13
Service Discovery-Server Side Discovery
14
Service Discovery-Client Side Discovery
Microservices can use MSB SDK to discovery and access other microservices within ONAP.
Service
Registry
Micorservice
(Consumer)
MSB
SDK
Micorservice
Instance A
Micorservice
Instance A
Micorservice
Instance A
10.74.215.33:3564
10.74.215.211:1522
10.74.215.8:3281
Load balance &
invoke
Query
Register
ONAP
15
Service Discovery-Client Side Discovery
16
Example & Demo-Without OOM
 Start MSB services
1. Run the Consul dockers.
sudo docker run -d --net=host --name msb_consul consul:0.9.3
2. Run the MSB dockers.
Login the ONAP docker registry first: docker login -u docker -p docker nexus3.onap.org:10001
sudo docker run -d --net=host --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery
sudo docker run -d --net=host -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway
nexus3.onap.org:10001/onap/msb/msb_apigateway
Explore the MSB portal.
http://127.0.0.1/msb
 Register and test your REST service with MSB via curl
https://wiki.onap.org/display/DW/MSB+Test+Environment+Setup
17
Example & Demo-Within OOM
 Precondition
Have kubernetes cluster, kubectl and helm installed.
Login the ONAP docker registry first: docker login -u docker -p docker nexus3.onap.org:10001
 Download oom from ONAP gerrit
git clone https://gerrit.onap.org/r/oom
 Install MSB and Kube2MSB registrator
cd ~/oom/kubernets/config
./createConfig.sh -n onap
cd ~/oom/kubernetes/oneclick/
../createAll.bash -a msb -n onap
./createAll.bash -a kube2msb -n onap
 Install AAI for testing
./createAll.bash -a aai-n onap
 Open the MSB IAG portal in the browser
You are able to see the registered AAI services at http://${Node_IP}:30080/msb
18
Suggested Integration approach-minimum
impact to existing codes
 Automatically MSB registration by OOM Kube2MSB
Access services via MSB Internal API Gateway
 Follows the standard URI structure
http://[host]:[port]/api/{service name}]/v{version number}/{resource}
https://wiki.onap.org/display/DW/RESTful+API+Design+Specification
19
The way going forward-OMSA
(ONAP Microservice Architecture)
External API Gateway
Service Discovery
Async Message Bus
Kafka
监控采集
GatewayDiscoveryMicroservicesInfrastructure
Registration
ServiceA
ADF JAVA ADF Go ADF
HTTP/JSON
RPC
agent
Governance
Configure
Management
API
Management
Monitoring
Distributed
Tracing
GRPC/protobuf
MetricsActiveMQ
Bare Metal
Python ADF
Registration
Logging
Orchestration
Update/Change
Deployment
Scaling/Healing
Instance 1
agent
Virtual Machine Containers Clouds
sidecar
Policy/Security
sidecar
Instance 2
Instance n
ServiceB
Instance 1
Instance 2
Instance n
OMSA is the vision of ONAP Microservice
Architecture to support carrier-grade
requirements of ONAP microservices,
which includes service
registration/discovery, service
communication, API gateway, service
orchestration, service governance and
service monitoring, etc.
Next step: Investgate Istio service mesh and
integrate Istio into OMSA when it's
production ready.
Note: this diagram is a functional view of OMSA, which is not mapped to specific projects

More Related Content

What's hot

Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
20190727 HashiCorp Consul Workshop: 管管你們家 config 啦
20190727 HashiCorp Consul Workshop: 管管你們家 config 啦20190727 HashiCorp Consul Workshop: 管管你們家 config 啦
20190727 HashiCorp Consul Workshop: 管管你們家 config 啦
Jiun-Yi Chen
 
Consul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesConsul: Service Mesh for Microservices
Consul: Service Mesh for Microservices
ArmonDadgar
 
Managing microservices with Istio Service Mesh
Managing microservices with Istio Service MeshManaging microservices with Istio Service Mesh
Managing microservices with Istio Service Mesh
Rafik HARABI
 
Get Your Data Flowing
Get Your Data FlowingGet Your Data Flowing
Get Your Data Flowing
Solace
 
Microservices With Istio Service Mesh
Microservices With Istio Service MeshMicroservices With Istio Service Mesh
Microservices With Istio Service Mesh
Natanael Fonseca
 
Introduction to Consul
Introduction to ConsulIntroduction to Consul
Introduction to Consul
Viswanath J
 
Protecting Multi-Interfaced Mobile Web Services using Agreements
Protecting Multi-Interfaced Mobile Web Services using Agreements Protecting Multi-Interfaced Mobile Web Services using Agreements
Protecting Multi-Interfaced Mobile Web Services using Agreements
Dr. Fahad Aijaz
 
Enterprise service bus part 1
Enterprise service bus part 1Enterprise service bus part 1
Enterprise service bus part 1
Return on Intelligence
 
Service Provider Architectures for Tomorrow by Chow Khay Kid
Service Provider Architectures for Tomorrow by Chow Khay KidService Provider Architectures for Tomorrow by Chow Khay Kid
Service Provider Architectures for Tomorrow by Chow Khay Kid
MyNOG
 
Layer 7 Observability and Centralized Configuration with Consul Service Mesh
Layer 7 Observability and Centralized Configuration with Consul Service MeshLayer 7 Observability and Centralized Configuration with Consul Service Mesh
Layer 7 Observability and Centralized Configuration with Consul Service Mesh
Mitchell Pronschinske
 
Using Microservices Architecture and Patterns to Address Applications Require...
Using Microservices Architecture and Patterns to Address Applications Require...Using Microservices Architecture and Patterns to Address Applications Require...
Using Microservices Architecture and Patterns to Address Applications Require...
Prem Sankar Gopannan
 
Service Mesh 101 - Digging into your service
Service Mesh 101 - Digging into your service Service Mesh 101 - Digging into your service
Service Mesh 101 - Digging into your service
Huynh Thai Bao
 
All About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice FrameworksAll About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice Frameworks
Mohammad Asif Siddiqui
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache Thrift
RX-M Enterprises LLC
 
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryIBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
Karen Broughton-Mabbitt
 
Service mesh on Kubernetes - Istio 101
Service mesh on Kubernetes - Istio 101Service mesh on Kubernetes - Istio 101
Service mesh on Kubernetes - Istio 101
Huy Vo
 
Big ip f5 ltm load balancing methods
Big ip f5 ltm load balancing methodsBig ip f5 ltm load balancing methods
Big ip f5 ltm load balancing methods
Utpal Sinha
 
Whats New in IBM Integration Bus Interconnect 2017
Whats New in IBM Integration Bus Interconnect 2017Whats New in IBM Integration Bus Interconnect 2017
Whats New in IBM Integration Bus Interconnect 2017
bthomps1979
 
Mule real-world-old
Mule real-world-oldMule real-world-old
Mule real-world-old
F K
 

What's hot (20)

Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
 
20190727 HashiCorp Consul Workshop: 管管你們家 config 啦
20190727 HashiCorp Consul Workshop: 管管你們家 config 啦20190727 HashiCorp Consul Workshop: 管管你們家 config 啦
20190727 HashiCorp Consul Workshop: 管管你們家 config 啦
 
Consul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesConsul: Service Mesh for Microservices
Consul: Service Mesh for Microservices
 
Managing microservices with Istio Service Mesh
Managing microservices with Istio Service MeshManaging microservices with Istio Service Mesh
Managing microservices with Istio Service Mesh
 
Get Your Data Flowing
Get Your Data FlowingGet Your Data Flowing
Get Your Data Flowing
 
Microservices With Istio Service Mesh
Microservices With Istio Service MeshMicroservices With Istio Service Mesh
Microservices With Istio Service Mesh
 
Introduction to Consul
Introduction to ConsulIntroduction to Consul
Introduction to Consul
 
Protecting Multi-Interfaced Mobile Web Services using Agreements
Protecting Multi-Interfaced Mobile Web Services using Agreements Protecting Multi-Interfaced Mobile Web Services using Agreements
Protecting Multi-Interfaced Mobile Web Services using Agreements
 
Enterprise service bus part 1
Enterprise service bus part 1Enterprise service bus part 1
Enterprise service bus part 1
 
Service Provider Architectures for Tomorrow by Chow Khay Kid
Service Provider Architectures for Tomorrow by Chow Khay KidService Provider Architectures for Tomorrow by Chow Khay Kid
Service Provider Architectures for Tomorrow by Chow Khay Kid
 
Layer 7 Observability and Centralized Configuration with Consul Service Mesh
Layer 7 Observability and Centralized Configuration with Consul Service MeshLayer 7 Observability and Centralized Configuration with Consul Service Mesh
Layer 7 Observability and Centralized Configuration with Consul Service Mesh
 
Using Microservices Architecture and Patterns to Address Applications Require...
Using Microservices Architecture and Patterns to Address Applications Require...Using Microservices Architecture and Patterns to Address Applications Require...
Using Microservices Architecture and Patterns to Address Applications Require...
 
Service Mesh 101 - Digging into your service
Service Mesh 101 - Digging into your service Service Mesh 101 - Digging into your service
Service Mesh 101 - Digging into your service
 
All About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice FrameworksAll About Microservices and OpenSource Microservice Frameworks
All About Microservices and OpenSource Microservice Frameworks
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache Thrift
 
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryIBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
 
Service mesh on Kubernetes - Istio 101
Service mesh on Kubernetes - Istio 101Service mesh on Kubernetes - Istio 101
Service mesh on Kubernetes - Istio 101
 
Big ip f5 ltm load balancing methods
Big ip f5 ltm load balancing methodsBig ip f5 ltm load balancing methods
Big ip f5 ltm load balancing methods
 
Whats New in IBM Integration Bus Interconnect 2017
Whats New in IBM Integration Bus Interconnect 2017Whats New in IBM Integration Bus Interconnect 2017
Whats New in IBM Integration Bus Interconnect 2017
 
Mule real-world-old
Mule real-world-oldMule real-world-old
Mule real-world-old
 

Similar to Microservice bus tutorial

Service Discovery in MicroServices
Service Discovery in MicroServicesService Discovery in MicroServices
Service Discovery in MicroServices
SRINIVAS KOLAPARTHI
 
Microservice Powered Orchestration
Microservice Powered OrchestrationMicroservice Powered Orchestration
Microservice Powered Orchestration
Open Networking Summit
 
Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)
Laurent Bernaille
 
Ipso smart object seminar
Ipso smart object seminarIpso smart object seminar
Ipso smart object seminar
Michael Koster
 
HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
 HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ... HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
Matt Leming
 
Hia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economyHia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economy
Andrew Coleman
 
Introducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.comIntroducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.com
Ivan Kruglov
 
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
PolarSeven Pty Ltd
 
Working with PowerVC via its REST APIs
Working with PowerVC via its REST APIsWorking with PowerVC via its REST APIs
Working with PowerVC via its REST APIs
Joe Cropper
 
F5 BigIP LTM Initial, Build, Install and Licensing.
F5 BigIP LTM Initial, Build, Install and Licensing.F5 BigIP LTM Initial, Build, Install and Licensing.
F5 BigIP LTM Initial, Build, Install and Licensing.
Kapil Sabharwal
 
Microservices with Spring
Microservices with SpringMicroservices with Spring
Microservices with Spring
Carlos Cavero Barca
 
Consul 1.6: Layer 7 Traffic Management and Mesh Gateways
Consul 1.6: Layer 7 Traffic Management and Mesh GatewaysConsul 1.6: Layer 7 Traffic Management and Mesh Gateways
Consul 1.6: Layer 7 Traffic Management and Mesh Gateways
Mitchell Pronschinske
 
Consull7 webinar hasicorp
Consull7 webinar hasicorpConsull7 webinar hasicorp
Consull7 webinar hasicorp
Hien Nguyen Van
 
Microservices
MicroservicesMicroservices
Microservices
Ramesh (@Mavuluri)
 
F5 Meetup presentation automation 2017
F5 Meetup presentation automation 2017F5 Meetup presentation automation 2017
F5 Meetup presentation automation 2017
Guy Brown
 
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
WDDay
 
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCFMigrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Roy Braam
 
Open Source Networking Days- Service Mesh
Open Source Networking Days- Service MeshOpen Source Networking Days- Service Mesh
Open Source Networking Days- Service Mesh
CloudOps2005
 
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PROIDEA
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
Shubhra Kar
 

Similar to Microservice bus tutorial (20)

Service Discovery in MicroServices
Service Discovery in MicroServicesService Discovery in MicroServices
Service Discovery in MicroServices
 
Microservice Powered Orchestration
Microservice Powered OrchestrationMicroservice Powered Orchestration
Microservice Powered Orchestration
 
Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)
 
Ipso smart object seminar
Ipso smart object seminarIpso smart object seminar
Ipso smart object seminar
 
HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
 HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ... HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
 
Hia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economyHia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economy
 
Introducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.comIntroducing envoy-based service mesh at Booking.com
Introducing envoy-based service mesh at Booking.com
 
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
 
Working with PowerVC via its REST APIs
Working with PowerVC via its REST APIsWorking with PowerVC via its REST APIs
Working with PowerVC via its REST APIs
 
F5 BigIP LTM Initial, Build, Install and Licensing.
F5 BigIP LTM Initial, Build, Install and Licensing.F5 BigIP LTM Initial, Build, Install and Licensing.
F5 BigIP LTM Initial, Build, Install and Licensing.
 
Microservices with Spring
Microservices with SpringMicroservices with Spring
Microservices with Spring
 
Consul 1.6: Layer 7 Traffic Management and Mesh Gateways
Consul 1.6: Layer 7 Traffic Management and Mesh GatewaysConsul 1.6: Layer 7 Traffic Management and Mesh Gateways
Consul 1.6: Layer 7 Traffic Management and Mesh Gateways
 
Consull7 webinar hasicorp
Consull7 webinar hasicorpConsull7 webinar hasicorp
Consull7 webinar hasicorp
 
Microservices
MicroservicesMicroservices
Microservices
 
F5 Meetup presentation automation 2017
F5 Meetup presentation automation 2017F5 Meetup presentation automation 2017
F5 Meetup presentation automation 2017
 
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
 
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCFMigrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
 
Open Source Networking Days- Service Mesh
Open Source Networking Days- Service MeshOpen Source Networking Days- Service Mesh
Open Source Networking Days- Service Mesh
 
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 

Recently uploaded

Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
Vadym Kazulkin
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 

Recently uploaded (20)

Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 

Microservice bus tutorial

  • 1. Microservice Bus Tutorial Huabing Zhao, PTL of MSB Project, ZTE
  • 2. 2 Agenda MSB Overview Service Registration Service Discovery Example & Demo Suggested Integration Approach Future plan
  • 3. 3 MSB Overview-Introduction Microservices Bus(MSB) provide a reliable, resilient and scalable communication and governance infrastructure to support Microservice Architecture including including service registration/discovery, external API gateway, internal API gateway, client SDK. It's a pluggable architecture so it can integrate with auth service provider to provide centralized Authentication & Authorization. MSB also provides a service portal to manage the REST APIs. MSB doesn’t depend on a specific environment. It can work in bare metal, virtual machine or containerized environment.
  • 4. 4 MSB Overview-Functionalities CircuitBreaker Transformation RateLimiting Flowtagging Authentication Service requests statistics and analysis Pluggable Architecture OtherPlug-in… Service Registration Service Discovery Service Change Notification Service Status Change Notification TCP/UDP Forwarding HTTP/HTTPS Forwarding WEB Socket Forwarding Route dynamically update FTP Forwarding Service Healthy Check Service Registration Load Balancing API Gateway
  • 5. 5 MSB Overview-Components • Registry Service information storage, MSB uses Consul as the service registry. • MSB Discovery Provides REST APIs for service discovery and registration • API Gateway Provide service request routing, load balancing and service governance. It can be deployed as external Gateway or Internal Gateway. • MSB SDK Java SDK for point to point communication MSB MSB Discovery External service Internal service External Gateway Internal Gateway Registry ONAP Microservices Microservice A Microservice B Microservice C MSB SDK 1 Service discovery 2 Service request 1 Service request 2 Route request to service provider Desktop External SystemsMobile External service request MSB Discovery External Gateway Internal Gateway
  • 6. 6 Service Registration-Information Model Attribute Description serviceName Service Name version Service Version url the actual URL of the service to be registered protocol supported protocols: 'REST', 'UI', 'HTTP','TCP' visualRange Visibility of the service. External(can be accessed by external systems):0 Internal(can only be accessed by ONAP microservices):1 path The customized publish path of this service. If path parameter is specified when registering the service, the service will be published to api gateway under this path. Otherwise, the service will be published to api gateway using a fixed format: api/{serviceName} /{version}. The customized publish path should only be used for back-compatible. lb_policy Load balancing method, Currently two LB methods are supported, round- robin and ip-hash. enable_ssl True if the registered service is based on https. False if the registered service is based on http. nodes ip: the ip of theservice instance node port: the port of the service instance node ttl: time to live, this parameter is reserved for later use
  • 7. 7 Service Registration-RESTFul API http method: POST url: http://{msb_ip}:{msb_port}/api/microservices/v1/services Example: curl -X POST -H "Content-Type: application/json" -d '{"serviceName": "test", "version": "v1", "url": "/","protocol": "REST", "lb_policy":"round-robin","nodes": [ {"ip": "127.0.0.1","port": "9090"}]}' "http://127.0.0.1:10081/api/microservices/v1/services”
  • 8. 8 Service Registration-MSB SDK Microservices can use MSB SDK to register themselves to MSB. MSB ONAP Microservice MSB SDK REST API
  • 9. 9 Service Registration-Kube2msb Registrator MSB MSB Discovery External service Internal service External Gateway Internal Gateway Registry ONAP Operations Manager ONAP A&AI Kube2msb registrator Kube2msb registrator can register service endpoints for the microservices deployed by OOM • OOM(Kubernetes) deploy/start/stop ONAP components. • Registrator watches the kubernetes pod event . • Registrator registers service endpoint info to MSB. It also updates the service info to MSB when ONAP components are stopped/restarted/scaled by OOM 1 Pod Even (Start, Stop etc.) Policy SDC SO VF-CVF-C 2 Register Service Update Service k8s deployment specs (annotation)
  • 10. 10 Kube2msb Registrator-Service configuration Use Kubernetes annotations to attach service endpoint metadata to objects. Service endpoint can be defined at Pod level or Service level Pod level: leverage the LB capabilities of MSB to distribute requests to multiple pods Service level: MSB send the request to service(Cluster IP), K8s dispatch the request to the backend Pod Pod Pod Service MSB Register Pod Pod MSBRegister Register at service level Register at pod level
  • 12. 12 Service Discovery-Server Side Discovery Service Registry Micorservice (Consumer) Router Micorservice Instance A 10.74.215.33:3564 10.74.215.211:1522 10.74.215.8:3281 Invoke Load balance & invoke Query ONAP Register Micorservice Instance B Micorservice Instance C •Compared to client-side discovery, the client code is simpler since it does not have to deal with discovery. Instead, a client simply makes a request to the router. •One more network hop is required than when using client-side discovery Example: Curl http://msb_ip:msb_port/api/sdc/v1/catalog/resources
  • 14. 14 Service Discovery-Client Side Discovery Microservices can use MSB SDK to discovery and access other microservices within ONAP. Service Registry Micorservice (Consumer) MSB SDK Micorservice Instance A Micorservice Instance A Micorservice Instance A 10.74.215.33:3564 10.74.215.211:1522 10.74.215.8:3281 Load balance & invoke Query Register ONAP
  • 16. 16 Example & Demo-Without OOM  Start MSB services 1. Run the Consul dockers. sudo docker run -d --net=host --name msb_consul consul:0.9.3 2. Run the MSB dockers. Login the ONAP docker registry first: docker login -u docker -p docker nexus3.onap.org:10001 sudo docker run -d --net=host --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery sudo docker run -d --net=host -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway Explore the MSB portal. http://127.0.0.1/msb  Register and test your REST service with MSB via curl https://wiki.onap.org/display/DW/MSB+Test+Environment+Setup
  • 17. 17 Example & Demo-Within OOM  Precondition Have kubernetes cluster, kubectl and helm installed. Login the ONAP docker registry first: docker login -u docker -p docker nexus3.onap.org:10001  Download oom from ONAP gerrit git clone https://gerrit.onap.org/r/oom  Install MSB and Kube2MSB registrator cd ~/oom/kubernets/config ./createConfig.sh -n onap cd ~/oom/kubernetes/oneclick/ ../createAll.bash -a msb -n onap ./createAll.bash -a kube2msb -n onap  Install AAI for testing ./createAll.bash -a aai-n onap  Open the MSB IAG portal in the browser You are able to see the registered AAI services at http://${Node_IP}:30080/msb
  • 18. 18 Suggested Integration approach-minimum impact to existing codes  Automatically MSB registration by OOM Kube2MSB Access services via MSB Internal API Gateway  Follows the standard URI structure http://[host]:[port]/api/{service name}]/v{version number}/{resource} https://wiki.onap.org/display/DW/RESTful+API+Design+Specification
  • 19. 19 The way going forward-OMSA (ONAP Microservice Architecture) External API Gateway Service Discovery Async Message Bus Kafka 监控采集 GatewayDiscoveryMicroservicesInfrastructure Registration ServiceA ADF JAVA ADF Go ADF HTTP/JSON RPC agent Governance Configure Management API Management Monitoring Distributed Tracing GRPC/protobuf MetricsActiveMQ Bare Metal Python ADF Registration Logging Orchestration Update/Change Deployment Scaling/Healing Instance 1 agent Virtual Machine Containers Clouds sidecar Policy/Security sidecar Instance 2 Instance n ServiceB Instance 1 Instance 2 Instance n OMSA is the vision of ONAP Microservice Architecture to support carrier-grade requirements of ONAP microservices, which includes service registration/discovery, service communication, API gateway, service orchestration, service governance and service monitoring, etc. Next step: Investgate Istio service mesh and integrate Istio into OMSA when it's production ready. Note: this diagram is a functional view of OMSA, which is not mapped to specific projects