AntiMalware•August 5, 2026•🇷🇺Translated from Russian

Yandex Go Develops Custom DSL to Handle Complex Dynamic Ride Pricing Logic

Yandex Go has introduced a custom domain-specific language to manage the intricate logic behind calculating ride costs, replacing what would otherwise become an unmaintainable collection of conditional statements in the core service code.

Trip pricing at Yandex Go is far more complex than simple multiplication of distance and time. It incorporates geozones, real-time demand, discounts, toll roads, additional stops, and special requirements such as transporting a cat, bicycle, or skis. The same pricing engine is invoked not only when a ride is ordered but also when the route or payment method changes, when a trip ends, when support staff intervene, and when analysts verify data.

Pricing can be fixed, interval-based, or calculated by taximeter. To support this flexibility without constant redeployments, developers first gather parameters from multiple sources in parallel: tariff category, geozones, discounts, surge multipliers, and additional services. These dependencies form a graph executed asynchronously on userver, ensuring that failure of a non-critical source does not halt the entire calculation.

Previously the algorithm resided in C++, but because pricing rules change on average twice a week, frequent service updates became impractical. Redeploying the service across 50 pods takes approximately 40 minutes, and the growing set of dynamic configuration files would have turned the codebase into a museum of conditional statements.

Instead, Yandex created its own DSL featuring conditions, functions, immutable values, and fold operations in place of traditional loops. Rules are organized into sequential chains where each transformation receives the current price and parameters and returns a new result together with metadata. The language grammar is defined with ANTLR 4, and the Z3 theorem prover verifies that no program can generate an incorrect price.

As a result, changes to pricing logic no longer require service recompilation, erroneous versions can be rolled back instantly, and every calculation can be reproduced from input data and intermediate results. The pricing platform is already shared with Yandex Taxi, Delivery, and the electric-vehicle charging service.

Related articles

Habr•Other

Prod is Down: Free gVisor-Based Simulator Gives Strangers Root Access for Realistic Linux Incident Training

A Russian systems administrator has launched Prod is Down, a free online platform that lets users practice real incident response by granting them root consoles on deliberately broken Linux servers. The tool currently offers 13 scenarios covering PostgreSQL failures, OOM Killer events, full disks, expired certificates, nginx 502 errors, inode exhaustion, DNS issues, and open file limits. Each exercise runs inside gVisor sandboxes with strict resource limits, internal-only networking, and automated verification that checks service health rather than player commands. The author implemented an emulated systemd in Python so trainees can use familiar systemctl and journalctl commands without running a real init system. Multiple layers of isolation, including overlay filesystem tweaks and size monitoring, prevent abuse while still allowing sudo and realistic debugging. The platform records three random variants per scenario so memorized fixes from previous runs do not work on subsequent attempts.

Habr•Other

Home Lab Guide: Deploying Active Directory, Windows 7 Client and ELK Stack for Security Logging

A detailed tutorial walks readers through building an isolated VirtualBox lab featuring a Windows Server 2019 domain controller with DNS and DHCP, a Windows 7 client joined to the domain, and an ELK stack running Elasticsearch, Logstash and Kibana 9.4.2. The guide covers creation of organizational units, Group Policy Objects for advanced auditing, and configuration of Winlogbeat 7.17 to forward Security, System and Application logs to Logstash. Special attention is given to common pitfalls such as missing GPO extension attributes that prevent audit policies from applying and memory constraints when running the full ELK stack on limited RAM. The author emphasizes that Windows 7 is unsupported and should only be used in isolated lab networks. All steps are provided with exact PowerShell commands, netplan configurations, and Logstash pipeline examples suitable for a 192.168.100.0/24 NAT network.

Securitylab•Other

Building Your First Home Network Lab: Essential Tools and Experiments to Understand Corporate Networks

A cybersecurity professional without network knowledge resembles a guard without a building blueprint, spotting alarms but unable to trace the intruder. Setting up a personal lab on a standard computer bridges this gap through virtualization and hands-on practice with protocols and attacks. The guide recommends GNS3 for topology emulation, VirtualBox or VMware for running Windows and Linux workstations, Cisco Packet Tracer for quick simulations, Wireshark for traffic analysis, and draw.io for diagramming. Key experiments include configuring Cisco IOS routers with IP addressing, testing default gateways, observing ARP requests and replies, triggering broadcast storms via switch loops, and enabling STP to prevent loops. The lab demonstrates how legacy protocols like ARP expose networks to spoofing and why segmentation with VLANs and firewalls matters. Resources from CyberED provide demo access to courses on SOC analysis, penetration testing, and AI applications in security to extend learning.

Habr•Other

PSLC and Agent-Ops: From Product Support to Infrastructure Transformation

Sergey Zhitinsky, founder of Git in Sky, attended the OPS Talk by Sber meetup on October 19 and discussed the PSLC methodology with architect Alexander Shapovalov. PSLC, or Product Service Lifecycle, outlines two loops for restoring services immediately and improving reliability to prevent recurrence through teams, knowledge, and platform support. Agent-Ops focuses on eight detailed steps for individual infrastructure tasks: intention, evidence collection, diagnostics, planning, approval, controlled change, verification, and lessons learned. The article illustrates their complementary use in a scenario where post-release log growth fills a database disk, requiring both service restoration and root-cause fixes. Both approaches emphasize knowledge retention, action control, and human accountability, though Agent-Ops v0.5.1 mandates explicit human approval and separate execution for production changes. PSLC suits larger organizations with shared platforms, while Agent-Ops targets smaller teams handling infrastructure operations with AI agents.