I know we are comparing 2 different technologies, but I would like to know pros and cons of both. WCF is present for almost a decade now. Didn't anything similar exist in java world until now?
3 Answers
At a very high level they would both appear to address the same tooling space.
However, the differences I can pick up on:
- GRPC does not use SOAP to mediate between client and service over http. WCF supports SOAP.
- GRPC is only concerned with RPC style communication. WCF supports and promotes REST and POX style services in addition to RPC.
- GRPC provides support for multiple programming languages. WCF supports C# (and the other .net languages).
- GRPC uses protobuf for on-wire serialization, WCF uses either XML/JSON or windows binary.
- GRPC is open source - EDIT: So is WCF now: https://devblogs.microsoft.com/dotnet/corewcf-v1-released/
In short:
GRPC seems a much more focused services framework, it does one job really well and on multiple platforms.
WCF much more general purpose, but limited to .net for the time being (WCF is being ported to .net core but at time of writing only client side functionality is on .net core)

- 30,562
- 14
- 91
- 126
-
13
-
3WCF as a whole is not open sourced. Just WCF client library for .NET Core is. – wojciech_rak Feb 11 '17 at 21:33
-
5@tomredfern - https://github.com/dotnet/wcf contains only .NET Core client libraries, so that you can consume WCF from .NET Core. But you can't host a WCF service from .NET Core, you need full .NET framework. More information: https://github.com/dotnet/core/issues/130 and https://github.com/dotnet/wcf/issues/1200. With gRPC both client- and server-side libraries are open source, for all languages. In WCF only .NET Core client library is open source. – wojciech_rak Feb 14 '17 at 10:08
-
-
1Thank you for the explanation, this reminds me of that ancient spinner toy which everybody makes a big deal of in 2018 – Cristian E. Jun 01 '18 at 19:53
-
1I would also add that WCF natively supports only XML or JSON but it can be extended so that it supports any serialisation algorithm, last but not least the binary serialisation used by .net. – Kralizek Feb 28 '19 at 14:29
-
1Now CoreWCF was released by community. https://devblogs.microsoft.com/dotnet/corewcf-v1-released/ – informatorius Aug 15 '22 at 10:27
Apart from the answers mentioned, i wish to add that gRPC does not support windows/kerberos authentication, which is the defacto authentication mode in the corporate world.
For this reason, its very hard to migrate from WCF to gRPC.

- 2,153
- 7
- 38
- 60
-
I just read the MSDN [post](https://learn.microsoft.com/en-us/aspnet/core/grpc/authn-and-authz?view=aspnetcore-5.0) which describes that Windows Authentication is definitely possible with ASP.net core with gRPC. Of course the assumption is that we are migrating within .net realms. – Piyush Parashar Mar 11 '21 at 18:05
-
@PiyushParashar The same article specifically mentions that Windows Authentication is not supported. _Windows Authentication (NTLM/Kerberos/Negotiate) can't be used with gRPC. gRPC requires HTTP/2, and HTTP/2 doesn't support Windows Authentication._ https://learn.microsoft.com/en-us/aspnet/core/grpc/authn-and-authz?view=aspnetcore-5.0#other-authentication-mechanisms-1 – Sanal Jan 28 '23 at 07:01
As tom already mentioned:
WCF uses either XML/JSON or windows binary
while gRPC use binary, which makes messages much thinner and faster to deserialize on the client/server end-point. simply by dropping the human readability feature.
Also, please note that WCF
needs extra configurations (and hassles) to comply with HTTP2
to gain its profits, e.g: shorter header and body (which means even faster transmission), more secure and reliable connection, and multiplexing (a.k.a multiple request/response in parallel), server-push and so-on ..., while gRPC
has already embraced it.

- 2,117
- 1
- 33
- 55