github.com/tickoalcantara12/micro/v3@v3.0.0-20221007104245-9d75b9bcbab9/docs/v2/design/server/network.md (about)

     1  # Network
     2  
     3  The micro network service is a multi-cloud service networking solution which works across public and private environments.
     4  
     5  ## Overview
     6  
     7  The micro network provides multi-cloud capability and builds a large scale flat network over which all services can communicate with each other. 
     8  It makes use of our proxy, router, tunnel and network packages in go-micro to produce global routing across any environment. 
     9  
    10  The network generates a routing table based on the local service registry and shares this amongst nodes. It builds in a router and proxy so 
    11  any request made to any network node can be routed across the global network. It prioritises local routing first and can range up to 3 
    12  hops in a chain if needed.
    13  
    14  The most technical explanation currently lives at [https://micro.dev/blog/2019/12/05/building-a-microservices-network.html](https://micro.dev/blog/2019/12/05/building-a-microservices-network.html) and the wider product related focus [roadmap/network](https://github.com/m3o/development/blob/master/roadmap/network.md).
    15  
    16  ## Run Network
    17  
    18  Start the network seed node (Runs on port :8085)
    19  
    20  ```shell
    21  micro network
    22  ```
    23  
    24  Start the next nodes in a different environment connecting to the first (assuming its running at 10.0.0.1:8085)
    25  
    26  ```shell
    27  micro network --nodes=10.0.0.1:8085
    28  ```
    29  
    30  ## Network Services
    31  
    32  You may now list the nodes, routes, services and graph
    33  
    34  ```
    35  # list the nodes
    36  micro network nodes
    37  
    38  # list the routes
    39  micro network routes
    40  
    41  # list the services
    42  micro network services
    43  
    44  # print the graph
    45  micro network graph
    46  ```
    47  
    48  Any request now made through the network will be proxied to a service on the other side.
    49  
    50  Set your proxy to use the network
    51  ```
    52  MICRO_PROXY=go.micro.network go run main.go
    53  ```
    54  
    55  Your service will direct all traffic through the network. 
    56  
    57  
    58  ## Authentication
    59  
    60  Specify a network token to limit access to the network.
    61  
    62  ```
    63  MICRO_NETWORK_TOKEN=foobar micro network
    64  ```
    65  
    66  Nodes must provide a valid and matching token to join the network. The default token is "go.micro.tunnel" which allows 
    67  any node to join and communicate between them.
    68