elixir phoenix migration

gRPC vs Phoenix: Different Jobs, Sometimes Both

Daniil Popov November 25, 2026

gRPC is for programs talking to programs. Phoenix is for people using a web app. They meet more often than you'd think, and in one of our projects one of them pushed the other out.

The accounting system in our case study used gRPC between the Python services and Zeebe, a Java workflow engine that held the business logic. When we moved the system to Phoenix, the workflows became plain Elixir code, Zeebe went away, and gRPC went with it.

So the search "grpc vs phoenix" makes sense to me. But in general they do different jobs, and sometimes you want both.

Two different tools

gRPC is a way for programs to call each other over the network. You describe the service in a schema file, and gRPC generates client and server code from it. By default the schema language is Protocol Buffers, and on the wire gRPC "largely follows HTTP semantics over HTTP/2", with streaming in both directions.

Phoenix is a web framework for Elixir. It serves web pages, JSON APIs, websockets and LiveView, the part that renders interactive UI from the server. It's the application, not the wire between applications.

So the honest comparison is between gRPC and REST, or gRPC and Phoenix Channels, or gRPC and just calling a function. That last one is the one people forget.

Why gRPC often disappears in an Elixir system

Teams add gRPC when one service needs to call another fast and with a strict contract. That's a real need if you have many services in many languages.

Elixir runs on the BEAM, and the BEAM was built for many small processes talking to each other. Inside one application they send messages directly. Across several machines in a cluster, they do the same thing, and the code barely changes. A lot of what other stacks split into services stays one application in Elixir, and a call that went over gRPC becomes a function call.

In our case study that's what happened. Six Docker services became one, four languages became one, and gRPC had nothing left to connect.

When I'd keep gRPC

There are good reasons to use gRPC next to Phoenix:

  • You talk to services you don't own, in other languages, that already expose gRPC. Payment providers, ML model servers, internal platforms at a big company.
  • You run a Python model server and want a typed, fast contract between it and your Elixir app.
  • Your mobile apps already use gRPC and you don't want two API styles.

The Elixir side is covered. The grpc package on Hex brings gRPC to Elixir, so your Phoenix app can call those services directly.

When I'd skip it

If all the services are yours and you're thinking about gRPC only to connect pieces of your own product, I'd first ask why they are separate. Often it's because the original stack couldn't handle the load or the concurrency in one process. Elixir usually can. One deploy, one codebase, and no schema files to keep in sync between repos.

And if the other side is a browser, gRPC is not the natural choice. Phoenix gives you HTML, JSON or a websocket, which is what browsers speak.

Quick comparison

gRPC Phoenix
What it is RPC framework for service-to-service calls Web framework for Elixir
Contract Protocol Buffers schema, generated code Your Elixir code, plus JSON or HTML
Transport HTTP/2 HTTP, websockets
Good for Many services in many languages Web apps, APIs, real-time UI
Together? Yes, with the grpc package Yes

Got a system full of services?

If your product is several services held together with gRPC or REST, and every change touches three repos, it may be a good candidate for a module by module migration. We'll tell you honestly if the services earn their keep. More on how the pieces fit in the Elixir tech stack.

Share