Nâng CaoGolang iconGolang

gRPC trong Go dùng khi nào?

RPC framework dùng Protocol Buffers (protobuf).

  • Nhanh hơn REST (binary encoding, HTTP/2).
  • Dùng khi: microservices internal communication, streaming (bidirectional), cần type safety chặt.
  • Define service trong .proto file → protoc generate Go code.
  • Hỗ trợ: unary, server streaming, client streaming, bidirectional.

Xem toàn bộ Golang cùng filter theo level & chủ đề con.

Mở danh sách Golang