Этот документ объясняет внутреннее устройство распределённого rate limiter'а в YDB — от публичного gRPC API до алгоритма раздачи квоты внутри таблетки Kesus. Все ссылки ведут на исходный код в этом репозитории.
Документ объясняет внутреннее устройство механизма TTL (Time To Live) в YDB «сверху вниз»: от объявления в YQL/SDK до фактического удаления строк или вытеснения данных во внешнее хранилище. Все утверждения подкреплены ссылками на исходный код.
Разбор основан на чтении кода, а не только документации. Ссылки кликабельны и ведут в репозиторий.
Все ссылки на код — абсолютные и привязаны к коммиту
d41d62e45f6.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "errors" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "log" | |
| "os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| service: bot | |
| frameworkVersion: "3" | |
| provider: | |
| name: yandex-cloud | |
| runtime: golang117 | |
| environment: | |
| FOLDER_ID: b1g*** | |
| httpApi: | |
| payload: '1.0' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 | |
| kind: DaemonSet | |
| metadata: | |
| name: fluent-bit | |
| namespace: logging | |
| labels: | |
| k8s-app: fluent-bit-logging | |
| version: v1 | |
| kubernetes.io/cluster-service: "true" | |
| spec: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: fluent-bit-config | |
| namespace: logging | |
| labels: | |
| k8s-app: fluent-bit | |
| data: | |
| # Configuration files: server, input, filters and output | |
| # ====================================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Threading.Tasks; | |
| using Amazon.S3; | |
| using Amazon.S3.Transfer; | |
| namespace ConsoleApp1 | |
| { | |
| static class Program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "github.com/yandex-cloud/go-genproto/yandex/cloud/resourcemanager/v1" | |
| "github.com/yandex-cloud/go-sdk" | |
| "github.com/yandex-cloud/go-sdk/iamkey" | |
| ) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "go.mongodb.org/mongo-driver/bson" | |
| "go.mongodb.org/mongo-driver/mongo" | |
| "go.mongodb.org/mongo-driver/mongo/options" | |
| "time" | |
| ) |
NewerOlder