Apache Thrift logo

Apache Thrift

Apache Thrift is a software framework for scalable cross-language services development. It provides an interface definition language (IDL) and code generation engine for building RPC services that work efficiently across C++, Java, Python, PHP, Ruby, Erlang, Go, JavaScript, Node.js, Haskell, C#, Cocoa, Delphi, and many more languages. Originally developed at Facebook, Thrift is now an Apache Software Foundation top-level project used for high-performance internal microservices and APIs.

2 APIs 6 Features
Code GenerationCross-LanguageIDLRPCSerializationOpen Source

APIs

Apache Thrift IDL

The Thrift Interface Definition Language (IDL) is used to define data types and service interfaces in a language-neutral format. A .thrift file defines structs, enums, exception...

Apache Thrift Server API

The Thrift Server API provides server implementations for hosting Thrift services including TSimpleServer (single-threaded), TThreadedServer, TThreadPoolServer, and TNonblocking...

Features

Cross-Language Code Generation

Generate client and server stubs for 20+ programming languages from a single IDL file.

Binary Serialization

Compact binary serialization (TCompactProtocol) for high-performance inter-service communication.

Multiple Transports

TSocket, TFramedTransport, TFileTransport, TZlibTransport, and TMemoryBuffer transports.

Multiple Protocols

TBinaryProtocol, TCompactProtocol, TJSONProtocol, and TSimpleJSONProtocol serialization formats.

Async Server Support

Non-blocking async server (TNonblockingServer) for high-throughput service deployments.

Versioned Schema Evolution

Optional and default fields enable backward-compatible schema evolution across service versions.

Use Cases

Internal Microservices

High-performance binary RPC between internal microservices in polyglot environments.

Cross-Language APIs

Type-safe APIs that work identically across Java, Python, C++, and other languages.

Distributed Systems

Service mesh and distributed system communication with efficient binary serialization.

Integrations

Apache Cassandra

Cassandra uses Thrift (legacy) and CQL for client communication.

Apache HBase

HBase Thrift gateway for non-Java clients to access HBase.

Apache Hadoop

Hive Thrift server provides JDBC/ODBC access to Hive via Thrift protocol.

Resources

👥
GitHubRepository
GitHubRepository
🔗
Documentation
Documentation
🌐
Portal
Portal
🚀
GettingStarted
GettingStarted
📄
ReleaseNotes
ReleaseNotes
📜
TermsOfService
TermsOfService
📦
Python Package
SDK
📦
Java Maven Package
SDK