INTERNAL APIS: BORING REST VS SHINY GRPC. CONVINCE ME EITHER WAY

api-designgrpcrest17 replies · 595 views · started
  1. ugh. honest question from a startup backend team. Our three servcies and a mobile app communicate over REST and every few weeks smth breaks because one side renamed a field. gRPC with generated code sounds like it would end that. But i also hear about debugging pain, load balancer quirks and browser clients neednig a proxy. Wheres teh real trade-off?

    i dont want this to become a holy war in our next planning meeting. concrete experiences, good or bad, would help me bring smth more useful than opinions to the table. what surprised u the most after teh switch??

    cry

    2
  2. ahh classic a middle ground that worked for us: gRPC between backend services, plus a thin REST/JSON gateway at the edge for browsers and third parties. protobuf is still the single source of truth.

    1 2 helpful
  3. The contract problem is solvable without gRPC: an OpenAPI spec as the source of truth, generated clients, and a CI check that fails on breaking changes. That gets you most of the safety while keeping curl-able endpoints.

    lol

    13 2 helpful
  4. guys pls help told my boss it would take 10 minutes. its been 3 hours

    8 0 helpful
  5. been there man gRPC shines when u have many services, polyglot clients, and streaming needs 🔥 for a small number of services the tooling overhead (proto repos, codegen in CI, gRPC-aware load balancing over HTTP/2) can outweigh the benefits.

    26 5 helpful
  6. ok so one practical gotcha: L4 load balancers keep a single long-lived HTTP/2 connection per client, sooo gRPC traffic can pin to one backend. You need L7 balancing (Envoy, a service mesh, or client-side balancing) to spread it.

    2 0 helpful
  7. ok update: did what @bea.costa said and its fine now cant believe it was that simple lol

    party

    0 1 helpful
  8. lol same thing happened to me honestly just reset the update and save yourself teh pain

    7 0 helpful
  9. pro tip: write down what u change 👍 i didnt and had to redo grpc from scratch

    0 1 helpful
  10. following, havnig the same problem lmk how it goes

    14 0 helpful
  11. ok weird one spent half the night on three and im still not done

    0 2 helpful
  12. Debuggability matters more than people think. With REST u can replay a request with curl from a log line. With gRPC youll want grpcurl and server reflection enabled, and your team needs to learn them.

    5 0 helpful
  13. Id argue gRPC is worth it even for small teams because protobufs backward-compatibility rules force good habits from day one. idk maybe im wrong lol

    4 2 helpful
  14. oof pro tip: write down what u change 🔥 i didnt and had to redo three from scratch

    0 1 helpful

Reply to this topic

Sign in or create an account to reply.