github.com/tickoalcantara12/micro/v3@v3.0.0-20221007104245-9d75b9bcbab9/docs/v2/design/server/README.md (about) 1 # Server 2 3 The micro server is a standalone server that encapsulates all the features of micro in a single process. 4 5 ## Overview 6 7 We've moved from Go framework to an RPC runtime but the complexity of our system makes the orchestration 8 of individual services difficult. In a cloud based environment this is ok but locally or in smaller 9 systems its an overhead we don't want to incur. 10 11 The micro server is a lightweight standalone system for microservices. 12 13 ## Previous 14 15 We've previously made the entire stack available through a one command using `micro`. This boots the 16 entire micro stack of services as processes. Our aim is still to have this as a point of coordination 17 but individual processes do not serve well on machines with limited resources. 18 19 ## Solution 20 21 Our solution would be started using `micro server` and clustered by specifying a list of other 22 nodes to connect to with `--nodes`. 23 24 The server would be accessible on :8080 for http and :8081 for grpc. All calls would be routed 25 to internal systems but also may act as a pass through for other services. 26 27 We'd expect services to conform to some sort of namespacing such as go.micro.service.foo where 28 we'd enable calling /service/foo and combine that with the namespace. This may be an optional 29 thing. What this ultimately enables is: 30 31 - /api/ routes to go.micro.api.x 32 - /web/ routes to go.micro.web.x 33 - /service/ routes to go.micro.service.x 34 35 ## Deployments 36 37 Currently there is some overloading of concepts with `micro run` and the runtime service. 38 The syntax of the `micro run` command is `micro run [service] [version] [--source github.com/micro/services]`. 39 40 We propose to change this to `micro run [source]` for the following reasons: 41 - The name of the service is in the service source code. 42 - The version can be extracted from git. 43 44 The only thing we require is the source, which can be either: 45 46 - Local path to source 47 - Git url 48 - Relative path to the `github.com/micro/services` repo (ie. `helloworld/web`) 49 50 The runtime service can handle the extraction of the service name and version. 51