Micro is a platform for cloud native development

Micro License Go Report Card

Overview

Micro addresses the key requirements for building services in the cloud. It leverages the microservices architecture pattern and provides a set of services which act as the building blocks of a platform. Micro deals with the complexity of distributed systems and provides simpler programmable abstractions to build on.

Contents

  • Introduction - A high level introduction to Micro
  • Getting Started - The helloworld quickstart guide
  • Upgrade Guide - Update your go-micro project to use micro v3.
  • Architecture - Describes the architecture, design and tradeoffs
  • Reference - In-depth reference for Micro CLI and services
  • Resources - External resources and contributions
  • Roadmap - Stuff on our agenda over the long haul
  • Users - Developers and companies using Micro in production
  • FAQ - Frequently asked questions
  • Blog - For the latest from us

Features

Below are the core components that make up Micro.

Server

Micro is built as a microservices architecture and abstracts away the complexity of the underlying infrastructure. We compose this as a single logical server to the user but decompose that into the various building block primitives that can be plugged into any underlying system.

The server is composed of the following services.

  • API - HTTP Gateway which dynamically maps http/json requests to RPC using path based resolution
  • Auth - Authentication and authorization out of the box using jwt tokens and rule based access control.
  • Broker - Ephemeral pubsub messaging for asynchronous communication and distributing notifications
  • Config - Dynamic configuration and secrets management for service level config without the need to restart
  • Events - Event streaming with ordered messaging, replay from offsets and persistent storage
  • Network - Inter-service networking, isolation and routing plane for all internal request traffic
  • Proxy - An identity aware proxy used for remote access and any external grpc request traffic
  • Runtime - Service lifecycle and process management with support for source to running auto build
  • Registry - Centralised service discovery and API endpoint explorer with feature rich metadata
  • Store - Key-Value storage with TTL expiry and persistent crud to keep microservices stateless

Framework

Micro additionally now contains the incredibly popular Go Micro framework built in for service development. The Go framework makes it drop dead simple to write your services without having to piece together lines and lines of boilerplate. Auto configured and initialised by default, just import and get started quickly.

Command Line

Micro brings not only a rich architectural model but a command line experience tailored for that need. The command line interface includes dynamic command mapping for all services running on the platform. Turns any service instantly into a CLI command along with flag parsing for inputs. Includes support for multiple environments and namespaces, automatic refreshing of auth credentials, creating and running services, status info and log streaming, plus much, much more.

Environments

Finally Micro bakes in the concept of Environments and multi-tenancy through Namespaces. Run your server locally for development and in the cloud for staging and production, seamlessly switch between them using the CLI commands micro env set [environment] and micro user set [namespace].

Install

From Source

go get github.com/micro/micro/v3

Using Docker

# install
docker pull micro/micro

# run it
docker run -p 8080-8081:8080-8081/tcp micro/micro server

Helm Chart

helm repo add micro https://micro.github.io/helm
helm install micro micro/micro

Release binaries

# MacOS
curl -fsSL https://raw.githubusercontent.com/micro/micro/master/scripts/install.sh | /bin/bash

# Linux
wget -q  https://raw.githubusercontent.com/micro/micro/master/scripts/install.sh -O - | /bin/bash

# Windows
powershell -Command "iwr -useb https://raw.githubusercontent.com/micro/micro/master/scripts/install.ps1 | iex"

Getting Started

Run the server locally

micro server

Set the environment to local (127.0.0.1:8081)

micro env set local

Login to the server

# user: admin pass: micro
micro login

Create a service

# generate a service (follow instructions in output)
micro new helloworld

# run the service
micro run helloworld

# check the status
micro status

# list running services
micro services

# call the service
micro helloworld --name=Alice

# curl via the api
curl -d '{"name": "Alice"}' http://localhost:8080/helloworld

Example Service

Micro includes a Go framework for writing services wrapping gRPC for the core IDL and transport.

Define services in proto:

syntax = "proto3";

package helloworld;

service Helloworld {
	rpc Call(Request) returns (Response) {}
}

message Request {
	string name = 1;
}

message Response {
	string msg = 1;
}

Write them using Go:

package main

import (
	"context"
  
	"github.com/micro/micro/v3/service"
	"github.com/micro/micro/v3/service/logger"
	pb "github.com/micro/services/helloworld/proto"
)

type Helloworld struct{}

// Call is a single request handler called via client.Call or the generated client code
func (h *Helloworld) Call(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
	logger.Info("Received Helloworld.Call request")
	rsp.Msg = "Hello " + req.Name
	return nil
}

func main() {
	// Create service
	srv := service.New(
		service.Name("helloworld"),
	)

	// Register Handler
	srv.Handle(new(Helloworld))

	// Run the service
	if err := srv.Run(); err != nil {
		logger.Fatal(err)
	}
}

Call with the client:

import (
	"context"
  
	"github.com/micro/micro/v3/service/client"
	pb "github.com/micro/services/helloworld/proto"
)

// create a new helloworld service client
helloworld := pb.NewHelloworldService("helloworld", client.DefaultClient) 

// call the endpoint Helloworld.Call
rsp, err := helloworld.Call(context.Background(), &pb.Request{Name: "Alice"})

Usage

See the docs for detailed information on the architecture, installation and use of the platform.

License

See LICENSE which makes use of Polyform Shield.

Hosting

For the hosted Micro Platform aka M3O see m3o.com.

Community

Join us in GitHub Discussions, Slack or follow on Twitter for updates.

Comments
  • [Discuss] micro dashboard

    [Discuss] micro dashboard

    is different from micro web. micro dashboard works for internal enviroment. micro web works for the open side which include services, network, ...

    micro dashboard cares below features:

    • config management
    • microservice management
    • microservice call
    • gateway management
    • monitor metrics
    • bot management
    • ...
    • pluggable, people can integrate everything like Ops tools into it.
  • Runtime class name not being passed on update (v3.1.0)

    Runtime class name not being passed on update (v3.1.0)

    micro version used: v3.1.0

    1. I create a new service called user on my local machine using: micro new user
    2. I cd into the new service root folder: cd user
    3. I deployed it to a remote Kubernetes cluster on GCP using: micro run .
    4. I made some changes to my handlers
    5. I tried to redeploy the service using: micro update .

    The last step fails and the service never gets updated on Kubernetes.

    The logs from the runtime (micro logs -f runtime) shows this:

    2021-02-28 19:41:49  file=handler/handler.go:474 level=info service=runtime Updating service user version latest source source://user:latest
    2021-02-28 19:41:49  file=manager/util.go:51 level=info service=runtime Preparing to build user:latest
    2021-02-28 19:41:49  file=manager/util.go:100 level=info service=runtime Build starting user:latest
    2021-02-28 19:42:23  file=manager/util.go:105 level=info service=runtime Build finished user:latest <nil>
    2021-02-28 19:42:23  file=manager/util.go:115 level=info service=runtime Uploading build user:latest
    2021-02-28 19:42:24  file=kubernetes/kubernetes.go:383 level=error service=runtime Runtime failed to update deployment: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"user-latest\" is invalid: spec.template.spec.runtimeClassName: Invalid value: \"\": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')","reason":"Invalid","details":{"name":"user-latest","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueInvalid","message":"Invalid value: \"\": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')","field":"spec.template.spec.runtimeClassName"}]},"code":422}
    

    Looks like an empty runtimeClassName on update.

  • Can't login to server

    Can't login to server

    When I run micro login I get the following -

    Enter username: admin
    Enter password: 
    Account not found with this ID
    

    Using admin / micro (server up and running fine)

  • Not authorized to perform this request On Win10

    Not authorized to perform this request On Win10

    Describe the bug On windows 10,I follow the https://micro.mu/getting-started

    To Reproduce Steps to reproduce the behavior:

    1. Install micro
    go get github.com/micro/micro/v3
    go get github.com/golang/protobuf/protoc-gen-go
    go get github.com/micro/micro/v3/cmd/protoc-gen-micro
    
    1. Start server by micro server
    2. Login by micro login --username admin --password micro and success
    3. Call micro service got Not authorized to perform this request

    Screenshots image

    Desktop (please complete the following information):

    • OS: Windows 10 Professional Edition(19042.867)
    • Browser N/A
    • Version N/A

    Additional context There are some guys with the same problem. #1590 #1603

  • How to create Custom API Gateway in Micro V3?

    How to create Custom API Gateway in Micro V3?

    Discussed in https://github.com/micro/micro/discussions/1924

    Originally posted by agus7fauzi March 21, 2022 Please help me, I'm having trouble creating a custom api gateway using a plugin based on that article https://developpaper.com/go-micro-service-go-micro-16-custom-micro-api-gateway-middleware-micro-plug-in-learning/ as I expected for my application, but the problem is the code really doesn't work on my Micro V3, does anyone know how to use a plugin in Micro V3 especially for API Gateway?

  • While Running A micro Server

    While Running A micro Server

    Describe the bug Trying to bring up micro server using getting started.

    Expected behavior Micro server to start

    Screenshots Screenshot 2021-03-12 at 8 58 53 PM

    image

    Desktop (please complete the following information):

    • OS: mac OS
    • Version micro version v3.1.1
  • Service

    Service "auth" not found

    Describe the bug After running micro server and entering any subsequent command (for example, micro services), the Service "auth" not found message is printed.

    micro login returns the following message. The same JSON is returned by the HTTP API interface:

    Error authorizing request: {"Id":"go.micro.client","Code":500,"Detail":
    "{\"Id\":\"go.micro.client\",\"Code\":500,\"Detail\":\"service auth: route not found\",\"Status\":\"Internal Server Error\"}","Status":"Internal Server Error"}
    

    To Reproduce Steps to reproduce the behavior:

    1. I have been following the tutorial.
    2. Start Micro by micro server
    3. Enter micro services, or try to login by micro login
    4. See the respective errors.

    Expected behavior

    • As per docs, micro login should print Successfully logged in., provided the credentials are correct.
    • micro services should list the running services.

    Screenshots The result of micro server: image The results of micro services: image

    Desktop (please complete the following information):

    • OS: Windows 10
    • Version: 10.0.19042 Build 19042
    • Micro version: v3.0.4

    Additional context I'm pretty sure it's an issue with mDNS. I have updated Windows to this version (10.0.19042), which supposedly have native mDNS support, tried setting EnableMulticast in Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient, installing Bonjour, etc. However, I'm totally new to Go, microservices and Micro and not that experienced in the low level networking stuff... I would be happy to use my Mac, but Go doesn't work with the M1 processors yet, as far as I know. So I'm stuck.

  • micro server log error

    micro server log error

    just

    go get github.com/micro/micro/v3
    

    and micro server

    C:\Users\Administrator>micro --version
    micro version v3.0.0-beta
    
    C:\Users\Administrator>micro server
    2020-09-12 10:26:00  file=server/server.go:111 level=info Starting server
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering network
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering runtime
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering registry
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering config
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering store
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering broker
    2020-09-12 10:26:00  file=local/service.go:240 level=error Service runtime terminated with error exit status 2
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering events
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering auth
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering proxy
    2020-09-12 10:26:00  file=server/server.go:122 level=info Registering api
    2020-09-12 10:26:00  file=server/server.go:187 level=info Starting server runtime
    2020-09-12 10:26:00  file=service/service.go:195 level=info Starting [service] server
    2020-09-12 10:26:00  file=grpc/grpc.go:898 level=info Server [grpc] Listening on [::]:10001
    2020-09-12 10:26:00  file=grpc/grpc.go:728 level=info Registry [mdns] Registering node: server-34b235a3-f095-4477-96b9-e2ac34031fcb
    2020-09-12 10:26:05  file=local/service.go:240 level=error Service runtime terminated with error exit status 2
    2020-09-12 10:26:10  file=local/service.go:240 level=error Service runtime terminated with error exit status 2
    2020-09-12 10:26:15  file=local/service.go:240 level=error Service runtime terminated with error exit status 2
    

    Service runtime terminated with error exit status 2

  • Go micro dashboard does not register my service when running inside docker-compose

    Go micro dashboard does not register my service when running inside docker-compose

    Posted this on Stackoverflow but no luck there so far.

    I'm new to go-micro, tried to have micro server running as another service in my docker-compose setup however my first micro-service is not getting show in Micro Web (the Go Micro dashboard). If I run micro server outside docker-compose I can see several go-micro-related micro-services in the dashboard, but inside docker-compose none is displayed.

    I have put together an example code that reproduces what I experience, I generated the service using micro new and changed nothing in it, the docker-compose.yml reflects how I have it setup in my project where I began experiencing this:

    https://github.com/shackra/go-micro-docker-compose-bug

    got this output:

    ➜ docker-compose up
    Starting go-micro-docker-compose-bug_example_1 ... done
    Starting go-micro-docker-compose-bug_micro_1   ... done
    Attaching to go-micro-docker-compose-bug_example_1, go-micro-docker-compose-bug_micro_1
    example_1  | 2020-07-02 03:35:06  [email protected]/service.go:200 level=info Starting [service] go.micro.service.example
    example_1  | 2020-07-02 03:35:06  file=grpc/grpc.go:864 level=info Server [grpc] Listening on [::]:46619
    example_1  | 2020-07-02 03:35:06  file=grpc/grpc.go:881 level=info Broker [http] Connected to 127.0.0.1:33619
    example_1  | 2020-07-02 03:35:06  file=grpc/grpc.go:697 level=info Registry [mdns] Registering node: go.micro.service.example-46f35090-fd8a-459b-abf1-5b3035066121
    example_1  | 2020-07-02 03:35:06  file=grpc/grpc.go:730 level=info Subscribing to topic: go.micro.service.example
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:125 level=info service=micro Loading core services
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.config
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.auth
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.network
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.runtime
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.registry
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.broker
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.store
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.router
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.debug
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.proxy
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.api
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.web
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.bot
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:150 level=info service=micro Registering micro.init
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:186 level=info service=micro Starting service runtime
    micro_1    | 2020-07-02 03:35:07  file=server/server.go:194 level=info service=micro Service runtime started
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=micro Starting [service] go.micro.server
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=micro Server [grpc] Listening on [::]:10001
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=micro Registry [mdns] Registering node: go.micro.server-48ff8f13-cc11-4389-b79d-5410113ab532
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=runtime Starting [service] go.micro.runtime
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=runtime Server [grpc] Listening on [::]:8088
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=runtime Registry [mdns] Registering node: go.micro.runtime-7ab4bdaa-8eef-47e4-9b18-092fae28acb2
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=registry Starting [service] go.micro.registry
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=registry Server [grpc] Listening on [::]:8000
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=registry Registry [mdns] Registering node: go.micro.registry-3fb6dd36-3457-449c-8c40-9340a98c86f3
    micro_1    | 2020-07-02 03:35:07  file=store/store.go:62 level=info service=store Initialising the [file] store with opts: {Nodes:[] Database:micro Table:store Context:<nil> Client:grpc}
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=store Starting [service] go.micro.store
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=store Server [grpc] Listening on [::]:35527
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=store Registry [mdns] Registering node: go.micro.store-c32d97a8-81bb-4505-a69b-6b67f3fe691a
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=auth Starting [service] go.micro.auth
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=auth Server [grpc] Listening on [::]:8010
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=auth Registry [mdns] Registering node: go.micro.auth-a8363f42-0e99-4211-88bb-69e94b557ebc
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info Starting [service] go.micro.config
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info Server [grpc] Listening on [::]:45667
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:887 level=info Broker [http] Connected to 127.0.0.1:32807
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info Registry [mdns] Registering node: go.micro.config-133079f3-8c2f-4c4d-8d77-b1f70a3c6f9b
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:734 level=info Subscribing to topic: go.micro.config.events
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=broker Starting [service] go.micro.broker
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=broker Server [grpc] Listening on [::]:8001
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=broker Registry [mdns] Registering node: go.micro.broker-d02dd0f7-ab33-4e37-9783-103312619e4b
    micro_1    | 2020-07-02 03:35:07  file=platform/platform.go:137 level=info service=init Starting service runtime
    micro_1    | 2020-07-02 03:35:07  file=platform/platform.go:144 level=info service=init Service runtime started
    micro_1    | 2020-07-02 03:35:07  file=bot/bot.go:219 level=info service=bot starting
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=bot Starting [service] go.micro.bot
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=bot Server [grpc] Listening on [::]:32911
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=bot Registry [mdns] Registering node: go.micro.bot-cc3a5499-2db9-4bde-b065-764be2078a92
    micro_1    | 2020-07-02 03:35:07  file=api/api.go:285 level=info service=api Registering API Default Handler at /
    micro_1    | 2020-07-02 03:35:07  file=http/http.go:90 level=info service=api HTTP API Listening on [::]:8080
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=api Starting [service] go.micro.api
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=api Server [grpc] Listening on [::]:37935
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=api Registry [mdns] Registering node: go.micro.api-29529723-9ca6-40a7-8f6c-14a48efee146
    micro_1    | 2020-07-02 03:35:07  file=proxy/proxy.go:215 level=info service=proxy Proxy [mucp] serving protocol: grpc
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=proxy Server [grpc] Listening on [::]:8081
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=proxy Registry [memory] Registering node: go.micro.server-3fc6e321-2bae-4a33-b0dc-7b3bff48775a
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=proxy Starting [service] go.micro.proxy
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=proxy Server [grpc] Listening on [::]:37097
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=proxy Registry [mdns] Registering node: go.micro.proxy-3fc6e321-2bae-4a33-b0dc-7b3bff48775a
    micro_1    | 2020-07-02 03:35:07  file=http/http.go:90 level=info service=web HTTP API Listening on [::]:8082
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=web Starting [service] go.micro.web
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=web Server [grpc] Listening on [::]:46627
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=web Registry [mdns] Registering node: go.micro.web-1986a07a-fb2f-4070-8592-6734e10f0672
    micro_1    | 2020-07-02 03:35:07  file=router/router.go:225 level=info service=router starting to advertise
    micro_1    | 2020-07-02 03:35:07  [email protected]/service.go:200 level=info service=router Starting [service] go.micro.router
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:870 level=info service=router Server [grpc] Listening on [::]:8084
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:887 level=info service=router Broker [http] Connected to 127.0.0.1:36919
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:701 level=info service=router Registry [mdns] Registering node: go.micro.router-5fc78527-1fe6-48ac-a56d-48eacdb46f2f
    micro_1    | 2020-07-02 03:35:07  file=grpc/grpc.go:734 level=info service=router Subscribing to topic: go.micro.router.adverts
    micro_1    | 2020-07-02 03:35:08  [email protected]/service.go:200 level=info service=debug Starting [service] go.micro.debug
    micro_1    | 2020-07-02 03:35:08  file=grpc/grpc.go:870 level=info service=debug Server [grpc] Listening on [::]:8089
    micro_1    | 2020-07-02 03:35:08  file=grpc/grpc.go:701 level=info service=debug Registry [mdns] Registering node: go.micro.debug-0a50a681-e929-4c31-8851-832559e1d9cf
    micro_1    | 2020-07-02 03:35:08  file=server/rpc_server.go:825 level=info service=server Transport [tunnel] Listening on 4129517757616118777
    micro_1    | 2020-07-02 03:35:08  file=server/rpc_server.go:845 level=info service=server Broker [tunnel] Connected to [::]:8085
    micro_1    | 2020-07-02 03:35:08  file=server/rpc_server.go:659 level=info service=server Registry [mdns] Registering node: go.micro-55a11382-b26c-420b-8734-f4719d302967
    micro_1    | 2020-07-02 03:35:08  file=network/network.go:209 level=info service=server Network [go.micro] listening on :8085
    micro_1    | 2020-07-02 03:35:08  [email protected]/service.go:200 level=info service=server Starting [service] go.micro.network
    micro_1    | 2020-07-02 03:35:08  file=grpc/grpc.go:870 level=info service=server Server [grpc] Listening on [::]:36015
    micro_1    | 2020-07-02 03:35:08  file=grpc/grpc.go:701 level=info service=server Registry [mdns] Registering node: go.micro.network-55a11382-b26c-420b-8734-f4719d302967
    micro_1    | 172.21.0.1 - - [02/Jul/2020:03:37:03 +0000] "GET / HTTP/1.1" 200 4846 "" "Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
    micro_1    | 172.21.0.1 - - [02/Jul/2020:03:37:03 +0000] "GET /favicon.ico HTTP/1.1" 200 0 "" "Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
    micro_1    | 2020-07-02 03:37:06  file=auth/wrapper.go:84 level=error service=web none available
    micro_1    | 172.21.0.1 - - [02/Jul/2020:03:37:05 +0000] "GET /client HTTP/1.1" 500 15 "http://localhost:8082/" "Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
    micro_1    | 2020-07-02 03:37:09  file=auth/wrapper.go:84 level=error service=web none available
    micro_1    | 172.21.0.1 - - [02/Jul/2020:03:37:09 +0000] "GET /services HTTP/1.1" 500 15 "http://localhost:8082/" "Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
    

    If I restart my example service micro will complain about it:

    example_1  | 2020-07-02 03:38:19  file=grpc/grpc.go:791 level=info Deregistering node: go.micro.service.example-46f35090-fd8a-459b-abf1-5b3035066121
    example_1  | 2020-07-02 03:38:19  file=grpc/grpc.go:814 level=info Unsubscribing from topic: go.micro.service.example
    example_1  | 2020-07-02 03:38:19  file=grpc/grpc.go:959 level=info Broker [http] Disconnected from 127.0.0.1:33619
    micro_1    | 2020-07-02 03:38:19  file=registry/registry.go:102 level=error service=api unable to get go.micro.service.example service: service not found
    go-micro-docker-compose-bug_example_1 exited with code 0
    micro_1    | 2020-07-02 03:38:28  file=handler/handler.go:227 level=error service=debug Error calling [email protected]:46619 ({"id":"go.micro.client","code":500,"detail":"connection error: desc = \"transport: Error while dialing dial tcp 172.21.0.2:46619: connect: connection refused\"","status":"Internal Server Error"})
    

    What am I doing wrong and how do I get the Micro dashboard to work as expected inside docker-compose?

  • Does api gateway support stream?

    Does api gateway support stream?

    Hi, When I trace down to API gateway code, I found that eventually it invokes client.Call() to the target micro service. But there is no place to support client/server stream mode, by invoking client.Stream(). Does the API gateway support it?

    Thanks Leon

  • Question: Micro Service Discovery over WAN using Consul

    Question: Micro Service Discovery over WAN using Consul

    Here is my deployment:

    1. Consul server agent running on machine A
    2. Consul agent running on Machine B, joined member with A
    3. A service 'example' runs on machine A
    4. micro list services and micro get service foo.example works from Machine A as well as from B
    5. micro query foo.example GetApi - This works only from machine A. I get an error when trying the same on machine B.

    ERROR: {"id":"go.micro.client","code":408,"detail":"call timeout: context deadline exceeded","status":"Request Timeout"}

    I am using go 1.7.4 on Ubuntu 16.04. Any advice to resolve this ?

  • Documentation

    Documentation

    TODO on documentation

    • Code examples
    • Dapr/Laravel like docs
    • Explain use cases e.g like M3O
    • Projects that are using the Micro platform
    • Design patterns for distributed architecture
  • grpc error

    grpc error "transport is closing"

    Describe the bug After migrating from micro v1 to microv3, even under a small load, some grpc connections break with error: file=grpc/grpc.go:237 level=error grpc handler got error: rpc error: code = Unknown desc = connection error: desc = "transport is closing" After that, an affected request is held until the timeout is reached.

    No additional information can be found in the logs. The same microservices with micro v1 worked well without such messages in the output.

    To Reproduce Steps to reproduce the behavior:

    1. Run the micro server without any additional params
    2. Run ~10 microservices (micro clients). Adding more clients doesn't affect the result.
    3. Generate 10-20 requests per second

    Environment: Same results in Ubuntu and Windows Server

    Are there any ideas about what could happen? Or maybe I can add some flags to micro to debug this deeper?

  • WebAssembly Support

    WebAssembly Support

    Look at supporting webassembly as a runtime so that we're running wasm based services. A long standing goal but it feels like now it might be entirely possible. It means apps would have to use the builtin framework or an sdk to communicate or store data. If we do a single process daemon microd it might be possible to run that in wasm also.

  • Tailscale Integration

    Tailscale Integration

    Integrate Tailscale so we can provide a secure network for Micro services across the public internet.

    Ideally we drop headscale into the server and the use tsnet for each service.

  • Micro Web Embed

    Micro Web Embed

    Add the ability to embed micro services through micro web. The idea here is to take something like /embed?service=foo&endpoint=bar and generate some javascript code which renders micro web forms in an embeddable way. The second part is to enable a user's current session to be embedded as an opaque token so we're not leaking JWTs.

Go Micro is a standalone framework for distributed systems development

Go Micro Go Micro is a framework for distributed systems development. Overview Go Micro provides the core requirements for distributed systems develop

Dec 31, 2022
High-Performance server for NATS, the cloud native messaging system.
High-Performance server for NATS, the cloud native messaging system.

NATS is a simple, secure and performant communications system for digital systems, services and devices. NATS is part of the Cloud Native Computing Fo

Jan 8, 2023
Kafka implemented in Golang with built-in coordination (No ZK dep, single binary install, Cloud Native)

Jocko Kafka/distributed commit log service in Go. Goals of this project: Implement Kafka in Go Protocol compatible with Kafka so Kafka clients and ser

Dec 28, 2022
CockroachDB - the open source, cloud-native distributed SQL database.
CockroachDB - the open source, cloud-native distributed SQL database.

CockroachDB is a cloud-native distributed SQL database designed to build, scale, and manage modern, data-intensive applications. What is CockroachDB?

Dec 29, 2022
Flowgraph package for scalable asynchronous system development

flowgraph Getting Started go get -u github.com/vectaport/flowgraph go test Links Wiki Slides from Minneapolis Golang Meetup, May 22nd 2019 Overview F

Dec 22, 2022
Dapr is a portable, event-driven, runtime for building distributed applications across cloud and edge.
Dapr is a portable, event-driven, runtime for building distributed applications across cloud and edge.

Dapr is a portable, serverless, event-driven runtime that makes it easy for developers to build resilient, stateless and stateful microservices that run on the cloud and edge and embraces the diversity of languages and developer frameworks.

Jan 5, 2023
A distributed systems library for Kubernetes deployments built on top of spindle and Cloud Spanner.

hedge A library built on top of spindle and Cloud Spanner that provides rudimentary distributed computing facilities to Kubernetes deployments. Featur

Nov 9, 2022
A distributed locking library built on top of Cloud Spanner and TrueTime.

A distributed locking library built on top of Cloud Spanner and TrueTime.

Sep 13, 2022
High performance, distributed and low latency publish-subscribe platform.
High performance, distributed and low latency publish-subscribe platform.

Emitter: Distributed Publish-Subscribe Platform Emitter is a distributed, scalable and fault-tolerant publish-subscribe platform built with MQTT proto

Jan 2, 2023
Cross-platform grid-based user interface framework.

Gruid The gruid module provides packages for easily building grid-based applications in Go. The library abstracts rendering and input for different pl

Nov 23, 2022
Lockgate is a cross-platform locking library for Go with distributed locks using Kubernetes or lockgate HTTP lock server as well as the OS file locks support.

Lockgate Lockgate is a locking library for Go. Classical interface: 2 types of locks: shared and exclusive; 2 modes of locking: blocking and non-block

Dec 16, 2022
A realtime distributed messaging platform
A realtime distributed messaging platform

Source: https://github.com/nsqio/nsq Issues: https://github.com/nsqio/nsq/issues Mailing List: [email protected] IRC: #nsq on freenode Docs:

Dec 29, 2022
Micro is a platform for cloud native development
Micro is a platform for cloud native development

Micro Overview Micro addresses the key requirements for building services in the cloud. It leverages the microservices architecture pattern and provid

Dec 29, 2022
An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers
An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers

Developer-oriented Continuous Delivery Product ⁣ English | 简体中文 Table of Contents Zadig Table of Contents What is Zadig Quick start How to use? How to

Oct 19, 2021
Cloudpods is a cloud-native open source unified multi/hybrid-cloud platform developed with Golang
Cloudpods is a cloud-native open source unified multi/hybrid-cloud platform developed with Golang

Cloudpods is a cloud-native open source unified multi/hybrid-cloud platform developed with Golang, i.e. Cloudpods is a cloud on clouds. Cloudpods is able to manage not only on-premise KVM/baremetals, but also resources from many cloud accounts across many cloud providers. It hides the differences of underlying cloud providers and exposes one set of APIs that allow programatically interacting with these many clouds.

Jan 11, 2022
Sample full stack micro services application built using the go-Micro framework.
Sample full stack micro services application built using the go-Micro framework.

goTemp goTemp is a full stack Golang microservices sample application built using go-micro. The application is built as a series of services that prov

Dec 26, 2022
crud is a cobra based CLI utility which helps in scaffolding a simple go based micro-service along with build scripts, api documentation, micro-service documentation and k8s deployment manifests

crud crud is a CLI utility which helps in scaffolding a simple go based micro-service along with build scripts, api documentation, micro-service docum

Nov 29, 2021
provide api for cloud service like aliyun, aws, google cloud, tencent cloud, huawei cloud and so on

cloud-fitter 云适配 Communicate with public and private clouds conveniently by a set of apis. 用一套接口,便捷地访问各类公有云和私有云 对接计划 内部筹备中,后续开放,有需求欢迎联系。 开发者社区 开发者社区文档

Dec 20, 2022
Go Micro is a framework for distributed systems development

Go Micro Go Micro is a framework for distributed systems development. Overview Go Micro provides the core requirements for distributed systems develop

Jan 8, 2023