Advertisement
Guest User

Untitled

a guest
Jul 8th, 2019
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## Start a service and set the proxy
  2.  
  3. - Client will send all requests to the proxy
  4. - If MICRO_PROXY is set the client looks up the registry for the proxy
  5. - If MICRO_PROXY_ADDRESS is set it calls the proxy directly
  6.  
  7. ```
  8. MICRO_PROXY=go.micro.proxy run service
  9. ```
  10.  
  11. ## Start the proxy and specify the router
  12.  
  13. - Proxy will call the router to get routes for a service
  14. - Same variable definitions as proxy for the client
  15. - Proxy will receive equivalent to selector Next nodes
  16.  
  17. ```
  18. MICRO_ROUTER=go.micro.router run proxy
  19. ```
  20.  
  21. ## Start the router with network gateway/address
  22.  
  23. - Router maps local routes to the network gateway
  24. - Router gossips with other routers to advertise routes
  25. - Router gives proxy next hop as network gateway for things outside local network
  26.  
  27. ```
  28. MICRO_NETWORK=go.micro.network run router
  29. ```
  30.  
  31. ## Start the network and join other network nodes
  32.  
  33. - Network is gateway with embedded proxy and router
  34. - Network receives requests from proxy and uses router to forward to next node
  35.  
  36. ```
  37. MICRO_NETWORK=micro.mu run network
  38. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement