---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ydb.tech/docs/en/recipes/ydb-sdk.md?version=main
  - https://ydb.tech/docs/ru/recipes/ydb-sdk.md?version=main
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 different programming languages for solving various common practical tasks using the YDB SDK.

Contents:

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

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

  - [Uniform random selection](https://ydb.tech/docs/en/recipes/ydb-sdk/balancing-random-choice.md?version=main)
  - [Prefer nearest datacenter](https://ydb.tech/docs/en/recipes/ydb-sdk/balancing-prefer-local.md?version=main)
  - [Prefer availability zone](https://ydb.tech/docs/en/recipes/ydb-sdk/balancing-prefer-location.md?version=main)
- [Retry query execution](https://ydb.tech/docs/en/recipes/ydb-sdk/retry.md?version=main)
- [Set session pool size](https://ydb.tech/docs/en/recipes/ydb-sdk/session-pool-limit.md?version=main)
- [Data insert](https://ydb.tech/docs/en/recipes/ydb-sdk/upsert.md?version=main)
- [Batch data insert](https://ydb.tech/docs/en/recipes/ydb-sdk/bulk-upsert.md?version=main)
- [Setting transaction execution mode](https://ydb.tech/docs/en/recipes/ydb-sdk/tx-control.md?version=main)
- [Configuring table TTL (Time to Live)](https://ydb.tech/docs/en/recipes/ydb-sdk/ttl.md?version=main)
- [Vector search](https://ydb.tech/docs/en/recipes/ydb-sdk/vector-search.md?version=main)
- Coordination

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

Connecting YDB SDK diagnostics — logging, metrics, and distributed tracing — is described in [Observability in YDB SDK](https://ydb.tech/docs/en/reference/ydb-sdk/observability/index.md?version=main).

See also:

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