---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://ydb.tech/docs/en/recipes/ydb-sdk.md?version=v26.1
  - https://ydb.tech/docs/ru/recipes/ydb-sdk.md?version=v26.1
  - href: en/recipes/ydb-sdk/index.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/core/recipes/ydb-sdk/index.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# Code recipes using YDB SDK and frameworks

This section contains code recipes in various programming languages for solving common practical tasks using YDB SDK.

Contents:

- [Driver initialization](https://ydb.tech/docs/en/recipes/ydb-sdk/init.md?version=v26.1)
- [Authentication](https://ydb.tech/docs/en/recipes/ydb-sdk/auth.md?version=v26.1)

  - [Using a token](https://ydb.tech/docs/en/recipes/ydb-sdk/auth-access-token.md?version=v26.1)
  - [Anonymous](https://ydb.tech/docs/en/recipes/ydb-sdk/auth-anonymous.md?version=v26.1)
  - [Service account file](https://ydb.tech/docs/en/recipes/ydb-sdk/auth-service-account.md?version=v26.1)
  - [Metadata service](https://ydb.tech/docs/en/recipes/ydb-sdk/auth-metadata.md?version=v26.1)
  - [Using environment variables](https://ydb.tech/docs/en/recipes/ydb-sdk/auth-env.md?version=v26.1)
  - [Using login and password](https://ydb.tech/docs/en/recipes/ydb-sdk/auth-static.md?version=v26.1)

- [Load balancing](https://ydb.tech/docs/en/recipes/ydb-sdk/balancing.md?version=v26.1)
  - [Uniform random selection](https://ydb.tech/docs/en/recipes/ydb-sdk/balancing-random-choice.md?version=v26.1)
  - [Prefer the nearest data center](https://ydb.tech/docs/en/recipes/ydb-sdk/balancing-prefer-local.md?version=v26.1)
  - [Prefer the availability zone](https://ydb.tech/docs/en/recipes/ydb-sdk/balancing-prefer-location.md?version=v26.1)

- [Retrying requests](https://ydb.tech/docs/en/recipes/ydb-sdk/retry.md?version=v26.1)
- [Setting the session pool size](https://ydb.tech/docs/en/recipes/ydb-sdk/session-pool-limit.md?version=v26.1)
- [Inserting data](https://ydb.tech/docs/en/recipes/ydb-sdk/upsert.md?version=v26.1)
- [Batch data insertion](https://ydb.tech/docs/en/recipes/ydb-sdk/bulk-upsert.md?version=v26.1)
- [Setting the transaction execution mode](https://ydb.tech/docs/en/recipes/ydb-sdk/tx-control.md?version=v26.1)
- [Configuring table row time-to-live (TTL)](https://ydb.tech/docs/en/recipes/ydb-sdk/ttl.md?version=v26.1)
- [Vector search](https://ydb.tech/docs/en/recipes/ydb-sdk/vector-search.md?version=v26.1)
- Coordination

  - [Distributed locking](https://ydb.tech/docs/en/recipes/ydb-sdk/distributed-lock.md?version=v26.1)
  - [Service discovery](https://ydb.tech/docs/en/recipes/ydb-sdk/service-discovery.md?version=v26.1)
  - [Configuration publication](https://ydb.tech/docs/en/recipes/ydb-sdk/config-publication.md?version=v26.1)
  - [Leader election](https://ydb.tech/docs/en/recipes/ydb-sdk/leader-election.md?version=v26.1)

- [Troubleshooting](https://ydb.tech/docs/en/recipes/ydb-sdk/debug.md?version=v26.1)

  - [Enable logging](https://ydb.tech/docs/en/recipes/ydb-sdk/debug-logs.md?version=v26.1)
  - [Connect metrics to Prometheus](https://ydb.tech/docs/en/recipes/ydb-sdk/debug-prometheus.md?version=v26.1)
  - [Tracing with OpenTelemetry](https://ydb.tech/docs/en/recipes/ydb-sdk/debug-otel.md?version=v26.1)

See also:

- [YDB for Application Developers / Software Engineers](https://ydb.tech/docs/en/dev/index.md?version=v26.1)
- [Example applications working with YDB](https://ydb.tech/docs/en/dev/example-app/index.md?version=v26.1)
- [Reference for YDB SDK](https://ydb.tech/docs/en/reference/ydb-sdk/index.md?version=v26.1)
