Code Read the original on Infoq 2 min read 0

Airbnb engineers reveal Sitar-agent sidecar architecture

Airbnb engineers have disclosed the technical architecture of Sitar-agent, a specialized Kubernetes sidecar designed to manage dynamic configuration updates for its massive microservices fleet. The system enables the company to push changes across tens of thousands of pods within tens of seconds while maintaining high availability during service disruptions. By utilizing a local sidecar model, Airbnb ensures that diverse services can access consistent configuration data without relying on constant direct communication with centralized infrastructure.

#Airbnb #Kubernetes #Cloud Infrastructure #Software Engineering #Sitar
Технічна діаграма архітектури системи Sitar-Agent з блоками для Git Flow, AWS S3 та контейнерів виробничих сервісів.
Технічна діаграма архітектури системи Sitar-Agent з блоками для Git Flow, AWS S3 та контейнерів виробничих сервісів. · Image source: Infoq

According to Infoq, Airbnb has detailed the architectural evolution of Sitar-agent, a critical component of its internal Sitar configuration system. The tool is engineered to handle high-frequency updates, processing configuration changes several times per minute across a vast distributed environment. By moving away from traditional redeployments, the system allows engineers to modify application behavior dynamically while ensuring that data remains accessible even if the primary configuration platform experiences downtime.

Modernization and Architectural Shifts

To improve reliability and startup performance, Airbnb recently underwent a significant modernization of Sitar-agent. This included a complete Java rewrite and a transition from Sparkey to SQLite as the local datastore. Engineers selected SQLite over alternatives like RocksDB because of its superior concurrency model and operational simplicity across various programming languages. These updates were designed to reduce dependencies on centralized infrastructure while enhancing the overall resilience of the microservices fleet.

The sidecar architecture serves configuration data locally through a shared filesystem and an in-memory cache. This design provides several key advantages for the company's multi-language environment:

  • Language independence across Java, Python, Go, TypeScript, and Ruby services.
  • Centralized delivery logic contained within a single component.
  • Reduced duplication of implementation efforts across different engineering teams.
  • Consistent behavior for configuration retrieval regardless of the application stack.
  • Snapshot Bootstrapping and Data Sync

    A major highlight of the redesign is the introduction of a snapshot-based startup workflow. Configuration snapshots are periodically generated and stored in Amazon S3. When a new pod initializes, Sitar-agent retrieves the latest snapshot from S3 and then synchronizes incremental updates from the Sitar backend before the application begins serving traffic. This method significantly reduces startup overhead and ensures that services can continue to operate even during temporary outages of the central configuration service.

    The system continues to utilize a pull-based distribution model where Sitar-agent polls the backend service approximately every ten seconds for updates. To manage this high frequency without overwhelming the infrastructure, Airbnb employs server-side caching and incremental change tracking. These mechanisms ensure that update propagation remains fast enough for operational workflows while maintaining a manageable load on the backend systems.

    The engineering team chose the sidecar approach over embedding logic into application libraries to simplify operations across the enterprise. By prioritizing consistency and ease of maintenance, Airbnb has created a robust framework for managing the complexities of large-scale microservice configurations.

    FAQ

    What languages does the Sitar-agent sidecar support?
    The sidecar architecture provides language independence for services written in Java, Python, Go, TypeScript, and Ruby. It ensures consistent behavior for configuration retrieval regardless of the specific application stack used by different engineering teams.
    How does Sitar-agent handle configuration updates without overwhelming the infrastructure?
    Sitar-agent uses a pull-based model polling the backend every ten seconds. To manage this high frequency, Airbnb employs server-side caching and incremental change tracking to ensure fast update propagation while maintaining a manageable load on backend systems.
    Why did Airbnb choose a sidecar architecture over application libraries?
    Airbnb chose the sidecar approach to simplify operations across the enterprise. This design allows for centralized delivery logic within a single component, reduces duplication of implementation efforts across teams, and ensures services can access consistent data without constant direct communication with centralized infrastructure.
    Telegram

    Fresh news on our Telegram

    Get instant alerts for new posts in «Code»

    @procodeandevenmore