Skip to content

Commit 4d9c109

Browse files
[#51]: updated documentation index
1 parent 9c2c6bc commit 4d9c109

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

Doc/docs/index.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -157,32 +157,33 @@ Let's test this by sending a simple TCP message `"Hello from proxy-sidecar"` fro
157157
To communicate with the poe this JSON format is required:
158158
```json
159159
{
160-
"direction":"<direction>",
161160
"service": <destination-service.namespace>,
161+
"direction":"<direction>",
162162
"payload":{
163-
"<message>": "<value>"
163+
"<payload>": "<message>"
164164
}
165165
}
166166
```
167167
Here's the explanation of each key:
168168

169-
- **direction**: The direction of the message (Incoming). If there's no direction in the payload the system logs an error message and send a "Delivery failed" ACK message
170-
- **service**: The name of the destination service. For example, if you want to send a message to the pod "test-proxy2" your destination is "test-proxy.cortexflow". In general, the default namespace is set to "cortexflow" as a fallback and can be not specified if your service lives in the cortexflow namespace,otherwise you must specify the namespace
169+
- **direction**: The direction of the message (Incoming). If there's no direction in the payload the system logs an error message and send a "Delivery failed" message
170+
- **service**: The name of the destination service. For example, if you want to send a message to the pod "test-proxy2" your destination is "test-proxy.cortexflow". In general, the default namespace is set to "cortexflow" as a fallback and can be not specified if your service lives in the cortexflow namespace,otherwise you must specify the namespace
171171
- **payload**: The message you want to send encoded in base64 format. You can easily encode a text message in base64 using this command:
172+
172173
```bash
173174
echo -n "Hello from proxy-sidecar" | base64
174175
```
175176
Result:
176177
```bash
177178
SGVsbG8gZnJvbSBwcm94eS1zaWRlY2Fy
178179
```
179-
If you try to send a message using a different format you'll get an error and a 'Delivery Failed' ACK message.
180+
181+
If you try to send a message using a different format you'll get an error and a 'Delivery Failed' message.
180182
Now that all the assumptions have been made, we can try to send a message to test-proxy2 from the test-proxy pod using this command:
181183
```bash
182-
kubectl exec test-proxy -c proxy-sidecar -n cortexflow -- sh -c \
183-
'echo "{\"service\":\"test-proxy2.cortexflow\",\"direction\":\"Incoming\",\
184-
\"payload\":\"eyJtZXNzYWdlIjogIkhlbGxvIGZyb20gcHJveHktc2lkZWNhciJ9\"}" | \
185-
nc -w 3 test-proxy2 5054 && echo "\n✅ Test completed"'
184+
kubectl exec test-proxy -c proxy-sidecar -n cortexflow -- sh -c '
185+
echo "Test: Incoming Message ⏳"
186+
printf "{\"service\":\"test-proxy2.cortexflow\",\"direction\":\"Incoming\",\"payload\":\"eyJwYXlsb2FkIjogIkhlbGxvIGZyb20gcHJveHktc2lkZWNhciJ9\"}\n" | nc -w3 test-proxy2 5054 && echo "✅ Test completed"
186187
```
187188
We receive this response:
188189
@@ -192,7 +193,6 @@ We receive this response:
192193
"service":"test-proxy2",
193194
"direction":"Outcoming"
194195
}
195-
196196
```
197197
At this point we have done! We received a success response from test-proxy2. We can decode the payload using this command:
198198
```base
@@ -225,5 +225,3 @@ Here's a detailed explanation of every key of the response:
225225
### Summary
226226
227227
The **CortexFlow Proxy** is the workhorse of the CortexFlow service mesh, enabling secure, reliable, and efficient communication between services. By handling traffic interception, encapsulation, and secure channel establishment, it ensures that your applications can communicate seamlessly without requiring any modifications. Additionally, its support for observability and logging provides valuable insights into system performance, making it easier to monitor and troubleshoot your cluster.
228-
229-
With features like UDP/TCP traffic interception, protocol-agnostic communication, and advanced resiliency mechanisms, the CortexFlow Proxy is an essential component for building robust and scalable distributed systems.

0 commit comments

Comments
 (0)