What is a usecase for the fabric-kafka and fabric-

2019-04-01 19:37发布

问题:

I can see there are 3 types of orderer. When I deploy a fabric-network up to 2 types are used.

https://hub.docker.com/r/hyperledger/fabric-orderer/ https://hub.docker.com/r/hyperledger/fabric-kafka/

https://hub.docker.com/r/hyperledger/fabric-ca-orderer/

The order documentation describes usage

https://github.com/hyperledger/fabric/blob/master/orderer/README.md

but I do not expect to see fabric-orderer and fabric-kafka containers in a fabric network.

What am I misunderstanding here?

回答1:

The architecture for Hyperledger Fabric allows for multiple types of ordering services. At the heart of the architecture is a common atomic broadcast interface.

The orderer interfaces are implemented in the orderer executable which is packaged as the fabric-orderer Docker image.

There are two configuration modes for the orderer:

1) Solo - this is a standalone, single process orderer primarily for use during development and test (although nothing would stop someone from using it for production - it would just not be fault tolerant)

2) Kafka - this leverages Kafka as the "consensus" mechanism to make multiple orderer processes crash fault tolerant and order transactions. In this case, multiple orderer processes communicate with a Kafka cluster which ensures that each orderer process receives transactions and generates blocks in the same order. The orderer process (or fabric-orderer containers) communicate with a Kafka cluster (which can be run using the fabric-kafka and fabric-zookeeper Docker images).