elixir grpc in Tubi
2020-03-01 341浏览
- 1.Elixir gRPC in Tubi tony@tubi
- 2.Overview • What’s gRPC? • gRPC in Tubi • Elixir gRPC in production • Problems
- 3.What’s gRPC?http://www.grpc.io/
- 4.gRPC • A RPC framework by Google • Based on HTTP/2 and (Google’s) Protobuf(default serialization) • Across languages • Used by Google for a long time(underlying technologies and concepts), Square, Netflix, Docker and so on
- 5.HTTP/2 • Long connection • Binary framing • Request and response multiplexing • Header compressionhttps://developers.google.com/web/fundamentals/performance/http2/
- 6.gRPC example // helloworld.proto package helloworld; service Greeter { rpc SayHello (HelloRequest) returns (HelloReply) {} } message HelloRequest { string name = 1; } message HelloReply { string message = 1; }https://github.com/elixir-grpc/grpc/tree/master/examples/helloworld
- 7.gRPC in Tubi
- 8.• Multiple languages(Nodejs, Elixir, Scala, …) • A common repo including all protos from all teams • Use Envoy between services • A repo for all Elixir generated files and common code
- 9.Elixir gRPC in production
- 10.Elixir gRPC in production • Performance • Stability • Envoy+Consul • Monitoring
- 11.How fast is elixir-grpc?
- 12.ghz --concurrency 6 --connections 6 @Macbook # ElixirSummary:'>Summary: