SSL in gRPC and performance

The SSL requirement of gRPC isn't necessarily making it easy to integrate. The HTTP/2 protocol requires ALPN support, which is a fairly new handshake protocol only supported by recent implementations.

As a result, we've tried hard to provide a smooth experience to our users when compiling and distributing gRPC, but this may come at performance costs due to this. More specifically, we will sometime build the SSL library by disabling assembly code (by setting the OPENSSL_NO_ASM option), which can impact performance by an order of magnitude when processing encrypted streams.

gRPC C++: Building from Source

Build systemConditionPlatformUses assembly optimizations
Makefilewith OpenSSL 1.0.2 development filesall:heavy_check_mark:
Makefileall other casesall:x:
BazelLinux:heavy_check_mark:
BazelMacOS:heavy_check_mark:
BazelWindows:x:
CMakeboringssl from submodule (default)Linux or MacOS:heavy_check_mark:
CMakeboringssl from submodule (default), generator=NinjaWindows:heavy_check_mark:
CMakeboringssl from submodule (default), generator=Visual StudioWindows:x:
CMakepre-installed OpenSSL 1.0.2+ (gRPC_SSL_PROVIDER=package)all:heavy_check_mark:

Other Languages: Binary/Source Packages

In addition, we are shipping packages for language implementations. These packages are source packages, but also have pre-built binaries being distributed. Building packages from source may give a different result in some cases.

LanguageFrom sourcePlatformUses assembly optimizations
C#n/aLinux, 64bit:heavy_check_mark:
C#n/aLinux, 32bit:x:
C#n/aMacOS:heavy_check_mark:
C#n/aWindows:heavy_check_mark:
Node.JSn/aLinux:heavy_check_mark:
Node.JSn/aMacOS:heavy_check_mark:
Node.JSn/aWindows:x:
Electronn/aall:heavy_check_mark:
ObjCYesiOS:x:
PHPYesallSame as the Makefile case from above
PHPNoall:x:
Pythonn/aLinux, 64bit:heavy_check_mark:
Pythonn/aLinux, 32bit:x:
Pythonn/aMacOS, 64bit:heavy_check_mark:
Pythonn/aMacOS, 32bit:x:
Pythonn/aWindows:x:
RubyNoall:x: