diff --git a/apps/docs/content/homepage.mdx b/apps/docs/content/homepage.mdx index 888d2c80..fd81f5a2 100644 --- a/apps/docs/content/homepage.mdx +++ b/apps/docs/content/homepage.mdx @@ -44,12 +44,12 @@ export const containers = [ export const databases = [ { name: "PostgreSQL", link: "/postgresql/overview", icon: }, { name: "MariaDB", link: "/mariadb/overview", icon: }, - { name: "KeyDB", link: "/keydb/overview", icon: }, + { name: "Valkey", link: "/valkey/overview", icon: }, { name: "Elasticsearch", link: "/elasticsearch/overview", icon: }, { name: "Typesense", link: "/typesense/overview", icon: }, { name: "Meilisearch", link: "/meilisearch/overview", icon: }, { name: "Qdrant", link: "/qdrant/overview", icon: }, - { name: "Valkey", icon: }, + { name: "KeyDB", link: "/keydb/overview", icon: }, { name: "Kafka", icon: }, { name: "NATS", icon: }, ] diff --git a/apps/docs/content/valkey/overview.mdx b/apps/docs/content/valkey/overview.mdx new file mode 100644 index 00000000..46d84ab4 --- /dev/null +++ b/apps/docs/content/valkey/overview.mdx @@ -0,0 +1,67 @@ +--- +title: Valkey +desc: Production-ready Valkey on Zerops platform with managed infrastructure and automatic security configuration. Deploy and run your in-memory data store with zero operational overhead. +--- + +import UnorderedList from '@site/src/components/UnorderedList'; +import UnorderedCodeList from '@site/src/components/UnorderedCodeList'; +import data from '@site/static/data.json'; + +Valkey is a powerful, open-source alternative to Redis, offering full compatibility with Redis clients while providing an independent development path focused on community-driven innovation. Deploy and manage Valkey on Zerops' fully managed infrastructure to get instant access to high-performance in-memory data storage. + +:::tip +Valkey is our recommended Redis alternative as KeyDB's development has slowed significantly in recent times. +::: + +## Supported Versions + +Currently supported Valkey versions: + + +Import configuration version: + + +## Service Configuration + +Zerops offers Valkey in two deployment configurations to meet different availability requirements. + +## Deployment Options + +### Non-HA Setup +- Single node deployment on port `6379` (non-TLS) and `6380` (TLS) +- No backup mechanism beyond Zerops infrastructure reliability +- Data persists unless the hardware node fails +- Suitable for development or non-critical workloads + +### HA (High Availability) Setup + +Our HA implementation uses a unique approach to ensure high availability while maintaining compatibility with all Redis clients: + +- 3-node configuration (1 master + 2 replicas) +- Access ports: + - `6379` - read/write operations (non-TLS, routed to master) + - `6380` - read/write operations over TLS (routed to master) + - `7000` - read-only operations (non-TLS) + - `7001` - read-only operations over TLS +- Implementation details: + - All nodes are configured identically and listen on standard ports + - First node in the cluster is designated as the master + - On replica nodes, ports `6379`/`6380` traffic is forwarded to the master + - Ports `7000`/`7001` are mapped locally to each node for direct replica access + - When a master fails, a replica is promoted and routing is updated automatically + - DNS entries are updated for seamless client connection + - This implementation provides traffic forwarding to master (not natively supported by Valkey) + +:::note +Be aware that replica data may lag slightly behind the master due to asynchronous replication. +::: + +## Learn More + +- [Official Valkey Documentation](https://valkey.io/docs) - Comprehensive guide to Valkey features + +## Support + +For advanced configurations or custom requirements: +- Join our [Discord community](https://discord.gg/zerops) +- Contact support via [email](mailto:support@zerops.io) \ No newline at end of file diff --git a/apps/docs/sidebars.js b/apps/docs/sidebars.js index 2099681f..596fb5b7 100644 --- a/apps/docs/sidebars.js +++ b/apps/docs/sidebars.js @@ -363,13 +363,13 @@ module.exports = { className: 'homepage-sidebar-item service-sidebar-item', }, { - type: 'ref', - id: 'keydb/overview', - label: 'KeyDB (Redis)', + type: "ref", + id: "valkey/overview", + label: "Valkey (Redis)", customProps: { - sidebar_icon: 'keydb', + sidebar_icon: "valkey", }, - className: 'homepage-sidebar-item service-sidebar-item', + className: "homepage-sidebar-item service-sidebar-item", }, { type: "ref", @@ -407,15 +407,15 @@ module.exports = { }, className: "homepage-sidebar-item service-sidebar-item", }, -// { -// type: "ref", -// id: "valkey/overview", -// label: "Valkey", -// customProps: { -// sidebar_icon: "valkey", -// }, -// className: "homepage-sidebar-item service-sidebar-item", -// }, + { + type: 'ref', + id: 'keydb/overview', + label: 'KeyDB', + customProps: { + sidebar_icon: 'keydb', + }, + className: 'homepage-sidebar-item service-sidebar-item', + }, // { // type: "ref", // id: "kafka/overview", @@ -2234,6 +2234,26 @@ module.exports = { }, }, ], + valkey: [ + { + type: 'ref', + id: 'homepage', + label: 'Back to home', + customProps: { + sidebar_is_back_link: true, + sidebar_icon: 'back-arrow', + }, + }, + { + type: 'doc', + id: 'valkey/overview', + label: 'Zerops Valkey Service', + customProps: { + sidebar_is_title: true, + sidebar_icon: 'valkey', + }, + }, + ], qdrant: [ { type: 'ref', diff --git a/apps/docs/static/llms-full.txt b/apps/docs/static/llms-full.txt index 03a66dc5..f04c2c9e 100644 --- a/apps/docs/static/llms-full.txt +++ b/apps/docs/static/llms-full.txt @@ -12522,13 +12522,9 @@ You should consider purging cached content when: ### Purging Cached Content -Zerops provides multiple ways to manage and purge cached content before its normal expiration. +Zerops provides multiple ways to manage and purge cached content before its normal expiration: -#### Using the Command Line or API - -You can purge CDN cache using: - -- **Command Line**: Use the [`zsc cdn purge`](/references/zsc#cdn) command available in all Zerops containers: +- **Command Line**: Use the `zsc cdn purge` [command](/references/zsc#cdn) available in all Zerops containers: ```sh # Purge all content for a domain zsc cdn purge example.com @@ -12537,7 +12533,19 @@ You can purge CDN cache using: zsc cdn purge example.com /images/ ``` -- **API Endpoints**: For programmatic control, use the [API endpoints](#api-reference). +- **API Endpoints**: For programmatic control, use the [API endpoints](#api-reference). Here are ready-to-use curl examples for quickly purging content in your scripts: + + ```sh + # Static mode: Purge all content for a domain + curl --location --request PUT "https://api.app-prg1.zerops.io/api/rest/public/project/$PROJECT_ID/purge-cdn/static/$DOMAIN/*" \ + --header "Authorization: Bearer $USER_OR_ACCESS_TOKEN" + ``` + + ```sh + # Storage mode: Purge all content for object storage + curl --location --request PUT "https://api.app-prg1.zerops.io/api/rest/public/service-stack/$OBJECT_STORAGE_SERVICE_ID/purge-cdn/*" \ + --header "Authorization: Bearer $USER_OR_ACCESS_TOKEN" + ``` #### Purge Pattern Examples @@ -22607,12 +22615,12 @@ export const containers = [ export const databases = [ { name: "PostgreSQL", link: "/postgresql/overview", icon: }, { name: "MariaDB", link: "/mariadb/overview", icon: }, - { name: "KeyDB", link: "/keydb/overview", icon: }, + { name: "Valkey", link: "/valkey/overview", icon: }, { name: "Elasticsearch", link: "/elasticsearch/overview", icon: }, { name: "Typesense", link: "/typesense/overview", icon: }, { name: "Meilisearch", link: "/meilisearch/overview", icon: }, { name: "Qdrant", link: "/qdrant/overview", icon: }, - { name: "Valkey", icon: }, + { name: "KeyDB", link: "/keydb/overview", icon: }, { name: "Kafka", icon: }, { name: "NATS", icon: }, ] @@ -38271,23 +38279,27 @@ You can use various database management tools from your local workstation to con ## How to install and manage PostgreSQL plugins +### Viewing available plugins You can list all available PostgreSQL plugins by running the following query *(superuser privileges not required)*: ```sql SELECT * FROM pg_available_extensions ORDER BY name; ``` -To install plugins, you must **connect as a superuser** (see note below) and run the appropriate CREATE EXTENSION command. For example: +### Installing plugins (requires superuser) -```sql -CREATE EXTENSION pg_stat_statements; -CREATE EXTENSION vector; -CREATE EXTENSION postgis; -``` +1. **Connect with superuser credentials**: + - Use the `superUser` (user `postgres`) and `superUserPassword` environment variables from your PostgreSQL service -:::info Superuser Credentials -The PostgreSQL superuser credentials can be found in the `superUser` and `superUserPassword` environment variables of your PostgreSQL service. -::: +2. **Switch to your service database**: + When logging in as the superuser, you're initially in the `postgres` database, not your service database. + +3. **Install required extensions**: + ```sql + CREATE EXTENSION pg_stat_statements; + CREATE EXTENSION vector; + CREATE EXTENSION postgis; + ``` :::warning Currently, it is not possible to add new plugins that are not already listed in `pg_available_extensions`. @@ -42207,13 +42219,13 @@ The system first loads the global config file, then merges in the project-specif ### Configuration File Examples -**Global config file (placed in user home directory):** +**Global config file:** ```yaml # Set organization-wide defaults workspaceState: "all" ``` -**Project-specific `.zcli.yml` file (placed in the root of your application repository):** +**Project-specific file:** ```yaml # Set project-specific settings projectId: "your-project-id" @@ -49803,6 +49815,169 @@ For advanced configurations or custom requirements: +Valkey is a powerful, open-source alternative to Redis, offering full compatibility with Redis clients while providing an independent development path focused on community-driven innovation. Deploy and manage Valkey on Zerops' fully managed infrastructure to get instant access to high-performance in-memory data storage. + +## Supported Versions + +Currently supported Valkey versions: + + +Import configuration version: + + +## Service Configuration + +Zerops offers Valkey in two deployment configurations to meet different availability requirements. + +## Deployment Options + +### Non-HA Setup +- Single node deployment on port tcp://:6379 +- No backup mechanism beyond Zerops infrastructure reliability +- Data persists unless the hardware node fails +- Suitable for development or non-critical workloads + +### HA (High Availability) Setup +- 3-node configuration (1 master + 2 replicas) +- Access ports: + - tcp://6379 - read/write operations (routed to master) + - tcp://7000 - read-only operations (writes will return errors) +- Automatic failover and recovery: + - Failed nodes are replaced automatically + - If master fails, a replica is promoted and others sync from it + - If replica fails, a new replica is created and synchronized + +### HA Implementation Details + +Our HA implementation uses a unique approach to ensure high availability while maintaining compatibility with all Redis clients: + +1. All nodes are configured identically and listen on port 6379 +2. The first node in the cluster is designated as the master +3. On replica nodes, port 6379 traffic is forwarded to the master +4. Port 7000 is mapped to port 6379 locally on each node for direct replica access +5. When a master fails, a replica is promoted to master, and routing is updated +6. DNS entries are updated automatically for seamless client connection +7. This implementation provides traffic forwarding to the master - a feature not natively supported by Valkey + +## Network Access + +### Internal Project Access + +Services within the same project can access Valkey directly: + +**For non-HA setup:** +``` +tcp://{hostname}:6379 +# TLS port +tcp://{hostname}:6380 +``` + +**For HA setup:** +``` +tcp://{hostname}:6379 # Read/write operations (routed to master) +tcp://{hostname}:7000 # Read-only operations (writes return errors) +``` + +> **Note:** Port 7000 for read-only operations is a Zerops-specific feature. Port forwarding on 6379 ensures all write operations reach the master regardless of which node you connect to. + +> **Performance tip:** For read-heavy workloads, use port 7000 to distribute reads across all nodes. Be aware that replica data may lag slightly behind the master due to asynchronous replication. + +## Quick Start Example + +Connect to Valkey in a Node.js application: + +```javascript +const { createClient } = require('redis'); + +// Connection details from Zerops environment variables +const VALKEY_HOST = process.env.hostname; +const VALKEY_PASSWORD = process.env.masterPassword; +const VALKEY_PORT = 6379; // Use 7000 for read-only in HA setup + +async function connectToValkey() { + const client = createClient({ + socket: { + host: VALKEY_HOST, + port: VALKEY_PORT + }, + password: VALKEY_PASSWORD + }); + + client.on('error', (err) => console.log('Valkey Client Error', err)); + + await client.connect(); + + // Basic operations + await client.set('key', 'value'); + const value = await client.get('key'); + console.log(value); + + return client; +} + +// Connect and use Valkey +connectToValkey().catch(console.error); +``` + +## Best Practices + +#### Working with HA Setup +- All write operations work automatically on port 6379 +- Use port 7000 for distributing read operations across replicas +- Consider replication lag when reading from replicas +- Failover is handled automatically - your application continues without interruption + +#### Security +- Store connection credentials securely in backend services +- Use TLS for encrypted connections +- Regularly rotate passwords + +#### Performance +- Use connection pooling for high-throughput applications +- Monitor memory usage and configure appropriate eviction policies +- Optimize data structures for your specific use cases + +#### Persistence +- Configure persistence settings based on your durability requirements +- Implement additional backup strategies if needed + +#### Error Handling +- Implement retry logic for temporary failures +- Set appropriate timeout values +- Handle potential replication lag in your application logic + +## Troubleshooting + +### Common Issues + +#### Connection Problems +- Verify your instance is running correctly +- Check authentication credentials +- Confirm the service is healthy in the Zerops dashboard + +#### Performance Issues +- Review memory allocation and eviction policies +- Monitor resource usage +- Consider upgrading to HA setup for better scalability +- Use monitoring tools to identify slow operations + +#### Authentication Issues +- Verify you're using the correct password +- Check that TLS is properly configured if using encrypted connections + +## Learn More + +- [Official Valkey Documentation](https://valkey.io/docs) - Comprehensive guide to Valkey features +- [Command Reference](https://valkey.io/commands) - Detailed command specifications + +## Support + +For advanced configurations or custom requirements: +- Join our [Discord community](https://discord.gg/zerops) +- Contact support via [email](mailto:support@zerops.io) + + + This is a list of all currently supported versions of technologies that can be used for build.base and run.base sections in `zerops.yaml`. diff --git a/apps/docs/static/llms-small.txt b/apps/docs/static/llms-small.txt index 7bde2dd6..fe7ab241 100644 --- a/apps/docs/static/llms-small.txt +++ b/apps/docs/static/llms-small.txt @@ -12247,13 +12247,9 @@ You should consider purging cached content when: ### Purging Cached Content -Zerops provides multiple ways to manage and purge cached content before its normal expiration. +Zerops provides multiple ways to manage and purge cached content before its normal expiration: -#### Using the Command Line or API - -You can purge CDN cache using: - -- **Command Line**: Use the [`zsc cdn purge`](/references/zsc#cdn) command available in all Zerops containers: +- **Command Line**: Use the `zsc cdn purge` [command](/references/zsc#cdn) available in all Zerops containers: ```sh # Purge all content for a domain zsc cdn purge example.com @@ -12262,7 +12258,19 @@ You can purge CDN cache using: zsc cdn purge example.com /images/ ``` -- **API Endpoints**: For programmatic control, use the [API endpoints](#api-reference). +- **API Endpoints**: For programmatic control, use the [API endpoints](#api-reference). Here are ready-to-use curl examples for quickly purging content in your scripts: + + ```sh + # Static mode: Purge all content for a domain + curl --location --request PUT "https://api.app-prg1.zerops.io/api/rest/public/project/$PROJECT_ID/purge-cdn/static/$DOMAIN/*" \ + --header "Authorization: Bearer $USER_OR_ACCESS_TOKEN" + ``` + + ```sh + # Storage mode: Purge all content for object storage + curl --location --request PUT "https://api.app-prg1.zerops.io/api/rest/public/service-stack/$OBJECT_STORAGE_SERVICE_ID/purge-cdn/*" \ + --header "Authorization: Bearer $USER_OR_ACCESS_TOKEN" + ``` #### Purge Pattern Examples @@ -22232,12 +22240,12 @@ export const containers = [ export const databases = [ { name: "PostgreSQL", link: "/postgresql/overview", icon: }, { name: "MariaDB", link: "/mariadb/overview", icon: }, - { name: "KeyDB", link: "/keydb/overview", icon: }, + { name: "Valkey", link: "/valkey/overview", icon: }, { name: "Elasticsearch", link: "/elasticsearch/overview", icon: }, { name: "Typesense", link: "/typesense/overview", icon: }, { name: "Meilisearch", link: "/meilisearch/overview", icon: }, { name: "Qdrant", link: "/qdrant/overview", icon: }, - { name: "Valkey", icon: }, + { name: "KeyDB", link: "/keydb/overview", icon: }, { name: "Kafka", icon: }, { name: "NATS", icon: }, ] @@ -37896,23 +37904,27 @@ You can use various database management tools from your local workstation to con ## How to install and manage PostgreSQL plugins +### Viewing available plugins You can list all available PostgreSQL plugins by running the following query *(superuser privileges not required)*: ```sql SELECT * FROM pg_available_extensions ORDER BY name; ``` -To install plugins, you must **connect as a superuser** (see note below) and run the appropriate CREATE EXTENSION command. For example: +### Installing plugins (requires superuser) -```sql -CREATE EXTENSION pg_stat_statements; -CREATE EXTENSION vector; -CREATE EXTENSION postgis; -``` +1. **Connect with superuser credentials**: + - Use the `superUser` (user `postgres`) and `superUserPassword` environment variables from your PostgreSQL service -:::info Superuser Credentials -The PostgreSQL superuser credentials can be found in the `superUser` and `superUserPassword` environment variables of your PostgreSQL service. -::: +2. **Switch to your service database**: + When logging in as the superuser, you're initially in the `postgres` database, not your service database. + +3. **Install required extensions**: + ```sql + CREATE EXTENSION pg_stat_statements; + CREATE EXTENSION vector; + CREATE EXTENSION postgis; + ``` :::warning Currently, it is not possible to add new plugins that are not already listed in `pg_available_extensions`. @@ -45051,6 +45063,169 @@ For advanced configurations or custom requirements: +Valkey is a powerful, open-source alternative to Redis, offering full compatibility with Redis clients while providing an independent development path focused on community-driven innovation. Deploy and manage Valkey on Zerops' fully managed infrastructure to get instant access to high-performance in-memory data storage. + +## Supported Versions + +Currently supported Valkey versions: + + +Import configuration version: + + +## Service Configuration + +Zerops offers Valkey in two deployment configurations to meet different availability requirements. + +## Deployment Options + +### Non-HA Setup +- Single node deployment on port tcp://:6379 +- No backup mechanism beyond Zerops infrastructure reliability +- Data persists unless the hardware node fails +- Suitable for development or non-critical workloads + +### HA (High Availability) Setup +- 3-node configuration (1 master + 2 replicas) +- Access ports: + - tcp://6379 - read/write operations (routed to master) + - tcp://7000 - read-only operations (writes will return errors) +- Automatic failover and recovery: + - Failed nodes are replaced automatically + - If master fails, a replica is promoted and others sync from it + - If replica fails, a new replica is created and synchronized + +### HA Implementation Details + +Our HA implementation uses a unique approach to ensure high availability while maintaining compatibility with all Redis clients: + +1. All nodes are configured identically and listen on port 6379 +2. The first node in the cluster is designated as the master +3. On replica nodes, port 6379 traffic is forwarded to the master +4. Port 7000 is mapped to port 6379 locally on each node for direct replica access +5. When a master fails, a replica is promoted to master, and routing is updated +6. DNS entries are updated automatically for seamless client connection +7. This implementation provides traffic forwarding to the master - a feature not natively supported by Valkey + +## Network Access + +### Internal Project Access + +Services within the same project can access Valkey directly: + +**For non-HA setup:** +``` +tcp://{hostname}:6379 +# TLS port +tcp://{hostname}:6380 +``` + +**For HA setup:** +``` +tcp://{hostname}:6379 # Read/write operations (routed to master) +tcp://{hostname}:7000 # Read-only operations (writes return errors) +``` + +> **Note:** Port 7000 for read-only operations is a Zerops-specific feature. Port forwarding on 6379 ensures all write operations reach the master regardless of which node you connect to. + +> **Performance tip:** For read-heavy workloads, use port 7000 to distribute reads across all nodes. Be aware that replica data may lag slightly behind the master due to asynchronous replication. + +## Quick Start Example + +Connect to Valkey in a Node.js application: + +```javascript +const { createClient } = require('redis'); + +// Connection details from Zerops environment variables +const VALKEY_HOST = process.env.hostname; +const VALKEY_PASSWORD = process.env.masterPassword; +const VALKEY_PORT = 6379; // Use 7000 for read-only in HA setup + +async function connectToValkey() { + const client = createClient({ + socket: { + host: VALKEY_HOST, + port: VALKEY_PORT + }, + password: VALKEY_PASSWORD + }); + + client.on('error', (err) => console.log('Valkey Client Error', err)); + + await client.connect(); + + // Basic operations + await client.set('key', 'value'); + const value = await client.get('key'); + console.log(value); + + return client; +} + +// Connect and use Valkey +connectToValkey().catch(console.error); +``` + +## Best Practices + +#### Working with HA Setup +- All write operations work automatically on port 6379 +- Use port 7000 for distributing read operations across replicas +- Consider replication lag when reading from replicas +- Failover is handled automatically - your application continues without interruption + +#### Security +- Store connection credentials securely in backend services +- Use TLS for encrypted connections +- Regularly rotate passwords + +#### Performance +- Use connection pooling for high-throughput applications +- Monitor memory usage and configure appropriate eviction policies +- Optimize data structures for your specific use cases + +#### Persistence +- Configure persistence settings based on your durability requirements +- Implement additional backup strategies if needed + +#### Error Handling +- Implement retry logic for temporary failures +- Set appropriate timeout values +- Handle potential replication lag in your application logic + +## Troubleshooting + +### Common Issues + +#### Connection Problems +- Verify your instance is running correctly +- Check authentication credentials +- Confirm the service is healthy in the Zerops dashboard + +#### Performance Issues +- Review memory allocation and eviction policies +- Monitor resource usage +- Consider upgrading to HA setup for better scalability +- Use monitoring tools to identify slow operations + +#### Authentication Issues +- Verify you're using the correct password +- Check that TLS is properly configured if using encrypted connections + +## Learn More + +- [Official Valkey Documentation](https://valkey.io/docs) - Comprehensive guide to Valkey features +- [Command Reference](https://valkey.io/commands) - Detailed command specifications + +## Support + +For advanced configurations or custom requirements: +- Join our [Discord community](https://discord.gg/zerops) +- Contact support via [email](mailto:support@zerops.io) + + + This is a list of all currently supported versions of technologies that can be used for build.base and run.base sections in `zerops.yaml`. diff --git a/apps/docs/static/llms.txt b/apps/docs/static/llms.txt index 68555be6..e630bac7 100644 --- a/apps/docs/static/llms.txt +++ b/apps/docs/static/llms.txt @@ -342,6 +342,7 @@ - [Tech Details](https://docs.zerops.io/shared-storage/tech-details) - [Overview](https://docs.zerops.io/static/overview) - [Overview](https://docs.zerops.io/typesense/overview) +- [Overview](https://docs.zerops.io/valkey/overview) - [Base List](https://docs.zerops.io/zerops-yaml/base-list) - [Cron](https://docs.zerops.io/zerops-yaml/cron) - [Specification](https://docs.zerops.io/zerops-yaml/specification) \ No newline at end of file