Skip to content

Commit abc8ec6

Browse files
authored
Merge branch 'main' into feat-ui-redesign-blog
Signed-off-by: Madelyn Olson <[email protected]>
2 parents ea4028f + 9d8abed commit abc8ec6

24 files changed

+622
-32
lines changed

.github/workflows/zola-deploy.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ jobs:
4040
repository: valkey-io/valkey-bloom
4141
path: valkey-bloom
4242

43+
- name: Checkout valkey-search
44+
uses: actions/checkout@v4
45+
with:
46+
repository: valkey-io/valkey-search
47+
path: valkey-search
48+
4349
- name: Checkout valkey-json
4450
uses: actions/checkout@v4
4551
with:
@@ -50,7 +56,7 @@ jobs:
5056
run: |
5157
cd website
5258
./build/init-topics-and-clients.sh ../valkey-doc/topics ../valkey-doc/clients
53-
./build/init-commands.sh ../valkey-doc/commands ../valkey/src/commands ../valkey-bloom/src/commands ../valkey-json/src/commands
59+
./build/init-commands.sh ../valkey-doc/commands ../valkey/src/commands ../valkey-bloom/src/commands ../valkey-json/src/commands ../valkey-search/src/commands
5460
5561
- name: Build only
5662
uses: shalzz/[email protected]

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ _data/groups.json
1313
_data/resp2_replies.json
1414
_data/resp3_replies.json
1515
_data/modules.json
16+
.vscode/*
17+
.idea/*
18+
tmp/*

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Valkey.io website
22

33
This repo contains the source for the valkey.io website (build scripts, template, blog posts, stylesheets, etc.).
4-
The build integrates content from [`valkey-io/valkey-doc`](https://github.com/valkey-io/valkey-doc) and the commands definitions from [`valkey-io/valkey`](https://github.com/valkey-io/valkey), [`valkey-io/valkey-bloom`](https://github.com/valkey-io/valkey-bloom), and [`valkey-io/valkey-json`](https://github.com/valkey-io/valkey-json) (see [Build Locally](#build-locally) below for more details)
4+
The build integrates content from [`valkey-io/valkey-doc`](https://github.com/valkey-io/valkey-doc) and the commands definitions from [`valkey-io/valkey`](https://github.com/valkey-io/valkey), [`valkey-io/valkey-bloom`](https://github.com/valkey-io/valkey-bloom), and [`valkey-io/valkey-json`](https://github.com/valkey-io/valkey-json) (see [Build Locally](#build-locally) below for more details)
55

66
## Contributing
77

@@ -29,7 +29,7 @@ Changes to external content (command reference, documentation topics) require a
2929
## Building additional content
3030

3131
**By default, the site will build without documentation topics, command reference, or the clients page.**
32-
The content for documentation topics and the clients page are stored within the `valkey-io/valkey-doc` repo.
32+
The content for documentation topics and the clients page are stored within the `valkey-io/valkey-doc` repo.
3333
The content for the command reference page is in the `valkey-io/valkey` repo.
3434

3535
If you want to build the site with this content, you'll need to have a local copy of `valkey-io/valkey-doc` and `valkey-io/valkey` _outside_ of this repo.
@@ -64,7 +64,8 @@ Commit your changes to your local copy of `valkey-io/valkey-doc`.
6464
### Building the command reference
6565

6666
The command reference (i.e. `/commands/set/`, `/commands/get/`, `/commands/lolwut/`) sources information from `valkey-io/valkey`, `valkey-io/valkey-bloom`, and `valkey-io/valkey-doc`.
67-
`valkey-io/valkey`, `valkey-io/valkey-bloom` and `valkey-io/valkey-json` provides the command metadata (items like computational complexity, version history, arguments, etc) whilst `valkey-io/valkey-doc` provides the command description and the command reply.
67+
`valkey-io/valkey`, `valkey-io/valkey-bloom`, `valkey-io/valkey-json` and `valkey-io/valkey-search` provides the command metadata (items like computational complexity, version history, arguments, etc)
68+
whilst `valkey-io/valkey-doc` provides the command description and the command reply.
6869

6970
```mermaid
7071
flowchart TD
@@ -75,13 +76,16 @@ flowchart TD
7576
H --> J[Files: /resp2_replies.json,<br/>/resp3_replies.json] --> Z[Command Reply]
7677
```
7778

78-
Let's say that this repo and your local copy of `valkey-io/valkey-doc`, `valkey-io/valkey-bloom`, `valkey-io/valkey-json`, and `valkey-io/valkey` reside in the same directories.
79+
Let's say that this repo and your local copy of `valkey-io/valkey-doc`, `valkey-io/valkey-bloom`, `valkey-io/valkey-json`, `valkey-io/valkey-search`
80+
and `valkey-io/valkey` reside in the same directories.
81+
7982
First, stop the `zola serve` process if you're running it.
8083
From the root directory of this repo run:
8184

8285
```shell
8386
# You should only need to run this once or when you add a new command.
84-
./build/init-commands.sh ../valkey-doc/commands ../valkey/src/commands ../valkey-bloom/src/commands ../valkey-json/src/commands
87+
./build/init-commands.sh ../valkey-doc/commands ../valkey/src/commands \
88+
../valkey-bloom/src/commands ../valkey-json/src/commands ../valkey-search/src/commands
8589
```
8690

8791
Then, restart Zola.

build/init-commands.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
# first check to make sure there are arguments
66
if [ -z "$1" ]; then
7-
echo "You must supply a path to the command docs as the first argument"
7+
echo "You must supply a path to the command docs as the first argument"
88
exit 1
9-
fi
9+
fi
1010

1111
if [ -z "$2" ]; then
12-
echo "You must supply a path to the command json as the second argument"
12+
echo "You must supply a path to the command json as the second argument"
1313
exit 1
1414
fi
1515

16-
# check for validity of these agruments as paths
16+
# check for validity of these arguments as paths
1717
if [ ! -d "$1" ]; then
1818
echo "The command doc directory must exist and be a valid path"
1919
exit 1
@@ -34,22 +34,31 @@ if [ ! -d "$4" ]; then
3434
exit 1
3535
fi
3636

37+
if [ ! -d "$5" ]; then
38+
echo "The Search module command JSON directory must exist and be a valid path"
39+
exit 1
40+
fi
41+
3742
ln -s $1 ./build-command-docs
3843
ln -s $2 ./build-command-json
3944
ln -s $3 ./build-bloom-command-json
4045
ln -s $4 ./build-json-command-json
46+
ln -s $5 ./build-search-command-json
47+
4148
for fname in $(find $1 -maxdepth 1 -iname "*.md")
4249
do
4350
base=${fname##*/}
4451
command=${base%.*}
4552
command_upper=$(awk '{ print toupper($0) }' <<< $command)
46-
if [[ "$command" != "index" ]]; then
53+
if [[ "$command" != "index" ]]; then
4754
if [ -f "$2/$command.json" ]; then
4855
metadata_path="/commands/$command.json in the 'valkey' repo"
4956
elif [ -f "$3/$command.json" ]; then
5057
metadata_path="/commands/$command.json in the 'valkey-bloom' repo"
5158
elif [ -f "$4/$command.json" ]; then
5259
metadata_path="/commands/$command.json in the 'valkey-json' repo"
60+
elif [ -f "$5/$command.json" ]; then
61+
metadata_path="/commands/$command.json in the 'valkey-search' repo"
5362
fi
5463
cat << EOF > "./content/commands/$command.md"
5564
+++

build/init-topics-and-clients.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
# first check to make sure there are arguments
66
if [ -z "$1" ]; then
7-
echo "You must supply a path to the topics as the first argument"
7+
echo "You must supply a path to the topics as the first argument"
88
exit 1
9-
fi
9+
fi
1010

1111
if [ -z "$2" ]; then
12-
echo "You must supply a path to the clients directory as the first argument"
12+
echo "You must supply a path to the clients directory as the second argument"
1313
exit 1
14-
fi
14+
fi
1515

16-
# check for validity of these agruments as paths
16+
# check for validity of these arguments as paths
1717
if [ ! -d "$1" ]; then
1818
echo "The topics directory must exist and be a valid path"
1919
exit 1

config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ command_description_path = "../build-command-docs/"
2323
command_json_path = "../build-command-json/"
2424
command_bloom_json_path = "../build-bloom-command-json/"
2525
command_json_json_path = "../build-json-command-json/"
26+
command_search_json_path = "../build-search-command-json/"
2627
client_json_path = "../build-clients/"
2728
doc_topic_path = "../build-topics/"
2829

content/authors/guowangy.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Wangyang Guo
3+
extra:
4+
photo: '/assets/media/authors/guowangy.jpg'
5+
github: guowangy
6+
---
7+
8+
Wangyang Guo is a Software Performance Optimization Engineer at Intel. He specializes in identifying and resolving performance bottlenecks in complex software systems. His contributions include significant performance enhancements to Valkey, the Linux kernel, glibc, and ClickHouse. His expertise spans database systems, low-level system optimization, and scalable distributed applications.

content/authors/lipzhu.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Lipeng Zhu
3+
extra:
4+
photo: '/assets/media/authors/lipzhu.jpg'
5+
github: lipzhu
6+
---
7+
8+
Lipeng Zhu is a Software Performance Optimization Engineer at Intel. His contributions to open-source software include performance enhancements for Valkey, the Linux kernel, GCC/libgfortran, and Chromium/libwebp2. His work focuses on identifying and resolving performance bottlenecks through advanced profiling techniques and architectural optimizations specifically designed for modern processor architectures.

content/authors/muhammadawawdi.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Muhammad Awawdi
3+
extra:
4+
photo: '/assets/media/authors/muhammadawawdi.jpeg'
5+
github: muhammad-awawdi-amazon
6+
---
7+
8+
Muhammad is a software engineer at AWS ElastiCache, building Valkey GLIDE and large-scale distributed systems. When he’s not building faster tech, he’s lifting weights, grilling barbecue, or geeking out over the latest innovations.

content/authors/nigel.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Nigel Brown
3+
extra:
4+
photo: '/assets/media/authors/nigel.jpg'
5+
github: pnbrown
6+
---
7+
8+
nigel is a Senior Developer Advocate on the Valkey project. He was drawn to the craft of software engineering because of the agency it provides people to build and interact with worlds of their own creation. He focuses on Cloud Native technologies and his passions in technology are community building, High Performance Computing, and free and open source software (and hardware).

content/blog/2024-12-22-az-affinity-strategy.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title= "Reducing application latency and lowering Cloud bill by setting up your client library"
33
date= 2025-01-08 01:01:01
44
description= "By implementing AZ affinity routing in Valkey and using GLIDE, you can achieve lower latency and cost savings by routing requests to replicas in the same AZ as the client."
5-
authors= [ "asafporatstoler", "adarovadya"]
5+
authors= [ "asafporatstoler", "adarovadya", "muhammadawawdi"]
66
[extra]
77
trending = true
88
featured_image = "/assets/media/featured/random-04.webp"
@@ -31,8 +31,9 @@ GLIDE provides flexible options tailored to your application’s needs:
3131
* ```PRIMARY```: Always read from the primary to ensure the freshness of data.
3232
* ```PREFER_REPLICA```: Distribute requests among all replicas in a round-robin manner. If no replica is available, fallback to the primary.
3333
* ```AZ_AFFINITY```: Prioritize replicas in the same AZ as the client. If no replicas are available in the zone, fallback to other replicas or the primary if needed.
34+
* ```AZ_AFFINITY_REPLICAS_AND_PRIMARY```: Prioritize replicas in the same AZ as the client. If no replicas are available in the zone, fallback to the primary in the same AZ. If neither are available, fallback to other replicas or the primary in other zones.
3435

35-
In Valkey 8, ```availability-zone``` configuration was introduced, allowing clients to specify the AZ for each Valkey server. GLIDE leverages this new configuration to empower its users with the ability to use AZ Affinity routing. At the time of writing, GLIDE is the only Valkey client library supporting the AZ Affinity strategy, offering a unique advantage.
36+
In Valkey 8, ```availability-zone``` configuration was introduced, allowing clients to specify the AZ for each Valkey server. GLIDE leverages this new configuration to empower its users with the ability to use AZ Affinity routing. At the time of writing, GLIDE is the only Valkey client library supporting the AZ Affinity strategies, offering a unique advantage.
3637

3738
## AZ Affinity routing advantages
3839

@@ -43,7 +44,7 @@ In Valkey 8, ```availability-zone``` configuration was introduced, allowing cli
4344

4445
2. **Minimize Latency** Distance between AZs within the same region— for example, in AWS, is typically up to 60 miles (100 kilometers)—adds extra roundtrip latency, usually in the range of 500µs to 1000µs. By ensuring requests remain within the same AZ, you can reduce latency and improve the responsiveness of your application.
4546

46-
**Example:**
47+
**Example 1:**
4748
Consider a cluster with three nodes, one primary and two replicas. Each node is located in a different availability zone. The client located in az-2 along with replica-1.
4849

4950
**With ```PREFER_REPLICA``` strategy**:
@@ -56,6 +57,20 @@ In Valkey 8, ```availability-zone``` configuration was introduced, allowing cli
5657
In this case, the client will read commands from a replica in the same client's AZ and the average latency is, for example, about 300 microseconds.
5758

5859
![AZ_AFFINITY Read strategy latency example](/assets/media/pictures/AZ_AFFINITY_strategy.png)
60+
61+
**Example 2:**
62+
Consider a cluster with three nodes, one primary and two replicas. Each node is located in a different availability zone. The client located in az-2 along with the primary node. The replicas are located in az-1 and az-3.
63+
64+
**With ```AZ_AFFINITY``` strategy**:
65+
In this case, the client attempts to read from a replica in the same AZ. Since none are available in az-2, it falls back to a replica in another AZ, such as az-1 or az-3.
66+
and the average latency is, for example, about 800 microseconds.
67+
68+
![AZ_AFFINITY Read strategy latency example](/assets/media/pictures/AZ_AFFINITY_strategy2.png)
69+
70+
**With `AZ_AFFINITY_REPLICAS_AND_PRIMARY` strategy**:
71+
In this case, the client first attempts to read from a replica in the same AZ. Since no local replica exists, it reads from the primary located in az-2. The average latency is, for example, about 300 microseconds.
72+
73+
![AZ_AFFINITY_REPLICAS_AND_PRIMARY Read strategy latency example](/assets/media/pictures/AZ_AFFINITY_REPLICAS_AND_PRIMARY_strategy.png)
5974

6075
## Configuring AZ Affinity Connections with GLIDE
6176

@@ -155,6 +170,9 @@ Setting up AZ affinity routing in GLIDE is simple, allowing you to leverage its
155170
## Conclusion
156171
By implementing AZ affinity routing in Valkey and using GLIDE, you can achieve lower latency and cost savings by routing requests to replicas in the same AZ as the client.
157172

173+
---
174+
*Updated May 2025 to cover the `AZ_AFFINITY_REPLICAS_AND_PRIMARY` strategy and a corresponding example.*
175+
158176
### Further Reading
159177
* [Valkey GLIDE GitHub Repository](https://github.com/valkey-io/valkey-glide)
160178
* [Valkey Documentation](https://valkey.io/)

0 commit comments

Comments
 (0)