cloudparts

TARS

Tencent’s microservice platform, in use there since 2008: an IDL and binary protocol, RPC libraries for C++, Go, Java, Node.js and PHP, and its own registry, config, logging, monitoring and deployment services with a web console.

TARS Foundation project
Type
Open source
Made by
TARS Foundation (Linux Foundation), built at Tencent
Foundation
TARS Foundation. A Linux Foundation project since June 2018, and the founding project of the TARS Foundation in March 2020. Part of the Linux Foundation
License
BSD 3-Clause
Facts checked
28 October 2026

What it is

TARS is two things. The first is an RPC framework: you describe structs and interfaces in a .tars file, a C++-like interface language, and a generator such as tars2cpp or tars2go writes the client proxy and the server base class. Every struct field carries a numbered tag from 0 to 255, and the binary encoding writes a small header of type and tag before each value, so new optional fields can be added without breaking old clients. Calls can be synchronous or asynchronous with a callback. Services are named in three parts, app, server and servant, as in TestApp.HelloServer.HelloObj, and a client asks for that name rather than an address.

The second is the platform that answers. A fixed set of framework services runs beside your own: tarsregistry is the name service that clients query and servers send heartbeats to, tarsnode on every machine starts, stops and watches the servers there, and tarsconfig, tarslog, tarsstat, tarsproperty and tarsnotify handle configuration files, remote logs, call statistics, custom metrics and alarms. TarsWeb, the web console, uploads a build through tarspatch and rolls it out to chosen nodes. K8SFramework runs the same services on Kubernetes with an operator and custom resources. Tencent has used the framework, internally called TAF, since 2008; it open-sourced it in April 2017 and gave it to the Linux Foundation in June 2018.

Why teams pick it

  • Batteries included: naming, load balancing, configuration, logging, metrics, alarms and deployment come with the framework, instead of being assembled from separate projects
  • Proven at very large scale inside Tencent, which the Linux Foundation said in 2020 ran TARS microservices on more than a million nodes
  • A compact, tag-based binary protocol that tolerates added fields, with code generation for C++, Go, Java, Node.js and PHP
  • Liberal BSD 3-Clause licence

Watch out for

  • Small and quiet outside China: some documentation, such as K8SFramework’s README, is only in Chinese, the foundation has published no news since April 2022, and in 2025–2026 most commits to the C++ framework came from one maintainer
  • The platform is its own world: services expect tarsnode and the registry, so mixing TARS with Kubernetes-native discovery, a service mesh or OpenTelemetry takes extra work
  • Its protocol and IDL are TARS-specific, with far fewer tools, gateways and language bindings than gRPC and Protocol Buffers
  • Some parts have stalled: DCache, the distributed in-memory store listed among the foundation’s projects, is archived on GitHub, and K8SFramework has not been updated since March 2024

Alternatives

What all remote procedure calls have in common →Compare side by side →

How it fits with other technologies

An interface in the TARS language, its server and a client call · cpp

// Hello.tars: tag numbers identify fields on the wire
module TestApp
{
    struct Greeting
    {
        0 require string name;
        1 optional int times = 1;   // added later: old clients just skip tag 1
    };
    interface Hello
    {
        int sayHello(Greeting g, out string reply);
    };
};

// HelloImp.h: implement the servant class that tars2cpp generated
class HelloImp : public TestApp::Hello
{
public:
    void initialize() override {}
    void destroy() override {}
    int sayHello(const TestApp::Greeting &g, std::string &reply,
                 tars::TarsCurrentPtr current) override
    {
        reply = "hello " + g.name;
        return 0;
    }
};

// Client: with a registry configured, a servant name is enough
tars::Communicator comm;
TestApp::HelloPrx prx;
comm.stringToProxy("TestApp.HelloServer.HelloObj", prx);
TestApp::Greeting greeting;
greeting.name = "Ada";
std::string reply;
int ret = prx->sayHello(greeting, reply);

The framework services#

A TARS platform has a handful of shared services, deployed on several machines for fault tolerance, and one tarsnode on every machine that runs your services.

What it does
`tarsregistry`Name service: returns the addresses of a servant, receives heartbeats, and passes start, stop and deploy commands to nodes
`tarsnode`Runs on every machine; starts, stops and monitors the servers there and forwards their heartbeats
`tarspatch`Stores uploaded builds and sends a chosen version to nodes on deploy
`tarsconfig`Central store for each service’s configuration files
`tarslog`Collects logs that servers send over the network
`tarsstat`, `tarsproperty`Call counts, latency and timeout rates per interface, and custom metrics such as queue size or cache hit rate
`tarsnotify`Collects error reports, such as a failed database connection, for alarms
TarsWebThe web console for deploying, configuring and monitoring services

See it in a real stack

No architecture uses TARS yet. Drop it into the playground and wire it up yourself.Open playground →
Where it came from2008–2026

Tencent built the framework internally as TAF, the Total Application Framework, and has used it since 2008; by the time it was open-sourced, its docs said, thousands of Tencent services ran on it across tens of thousands of machines. The open-source name comes from the robot in the film Interstellar. Tencent released it in April 2017.

In June 2018, at LinuxCon China, the Linux Foundation announced that TARS and TSeer, a lighter service-discovery framework built from TARS’s name service, had become LF projects, and Tencent became a Platinum member of the LF. On March 10, 2020 the project became the TARS Foundation, meant as a neutral home for more microservice projects, with Arm, Tencent, AfterShip, Ampere, API7, Kong and Zenlayer among its first members.

A free edX course followed in 2020 and a Certified TARS Application Developer exam opened in April 2022. Since then the foundation has been quiet, but the code is still maintained: TarsCpp and the framework had releases in 2026.

Why it’s built this way

Its own IDL and tagged binary encoding
Services in many languages had to talk to each other and evolve without coordinated upgrades. Numbered tags let a struct gain or lose optional fields while old and new code still decode each other’s messages.
Framework and operations platform in one
The project’s design notes put the protocol, the RPC libraries and the operations tools in three layers of one system, so that developers focus on business logic while the platform handles fault tolerance, load balancing, capacity and updates.
Three-part service names
Naming every servant as app, server and servant, resolved by the registry, keeps services written by different teams from clashing and lets clients call by name rather than by address.

Timeline

  1. 2008

    TAF in use inside Tencent

  2. 2017

    Open-sourced as TARS in April

  3. 2018

    TARS and TSeer become Linux Foundation projects in June

  4. 2020

    TARS Foundation formed on March 10; free edX course in September

  5. 2022

    Certified TARS Application Developer exam opens in April

  6. 2026

    TarsFramework 3.0.18 in July; TarsCpp 3.0.23 in September

Sources12 · facts checked 28 October 2026

Improve this page on GitHub