Skip to content

Commit 13657cf

Browse files
authored
Reduce AWS Latency by 200x: Drop from 7ms to 35μs (#485)
1 parent 6300c6d commit 13657cf

File tree

19 files changed

+2056
-3
lines changed

19 files changed

+2056
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# New Video - https://youtu.be/KOE_6QYQqA4
1+
# New Video - https://youtu.be/s6C-d3SDqoA
22

3-
[<img src="assets/268.png?raw=true">](https://youtu.be/KOE_6QYQqA4)
3+
[<img src="assets/269.png?raw=true">](https://youtu.be/s6C-d3SDqoA)
44

55
# Consulting
66

assets/268.png

-173 KB
Binary file not shown.

assets/269.png

600 KB
Loading

docs/contents.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
- [256 - Terraform AWS VPC Tutorial - Public, Private, and Isolated Subnets](../lessons/256)
186186
- [258 - Redis vs Valkey performance](../lessons/258)
187187
- [259 - Rust vs C++ Performance: Can Rust Actually Be Faster?](../lessons/259)
188-
- [260 - ZeroMQ vs Aeron: Best for Market Data? Performance (Latency & Throughput)](../lessons/260)
188+
- [260 - ZeroMQ vs Aeron: Best for Market Data? Performance (Latency & Throughput)](../lessons/264)
189189
- [265 - Rust vs C++ Performance: Can Rust Actually Be Faster? (Pt. 2)](../lessons/265)
190190
- [268 - Build a Secure AWS EKS CI/CD Pipeline: Step-by-Step Tutorial (ArgoCD + GitHub Actions)](../lessons/268)
191+
- [269 - Reduce AWS Latency by 200x: Drop from 7ms to 35μs](../lessons/269)

lessons/269/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Reduce AWS Latency by 200x: Drop from 7ms to 35μs
2+
3+
You can find tutorial [here](https://youtu.be/s6C-d3SDqoA).

lessons/269/app/.clang-format

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Generated from CLion C/C++ Code Style settings
2+
---
3+
Language: Cpp
4+
BasedOnStyle: Google
5+
AccessModifierOffset: -4
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignOperands: true
9+
AlignTrailingComments: false
10+
AlwaysBreakTemplateDeclarations: Yes
11+
BraceWrapping:
12+
AfterCaseLabel: false
13+
AfterClass: false
14+
AfterControlStatement: false
15+
AfterEnum: false
16+
AfterFunction: false
17+
AfterNamespace: false
18+
AfterStruct: false
19+
AfterUnion: false
20+
AfterExternBlock: false
21+
BeforeCatch: false
22+
BeforeElse: false
23+
BeforeLambdaBody: false
24+
BeforeWhile: false
25+
SplitEmptyFunction: true
26+
SplitEmptyRecord: true
27+
SplitEmptyNamespace: true
28+
BreakBeforeBraces: Custom
29+
BreakConstructorInitializers: AfterColon
30+
BreakConstructorInitializersBeforeComma: false
31+
ColumnLimit: 0
32+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
33+
ContinuationIndentWidth: 8
34+
IncludeCategories:
35+
- Regex: '^<.*'
36+
Priority: 1
37+
- Regex: '^".*'
38+
Priority: 2
39+
- Regex: '.*'
40+
Priority: 3
41+
IncludeIsMainRegex: '([-_](test|unittest))?$'
42+
IndentCaseLabels: true
43+
IndentWidth: 4
44+
InsertNewlineAtEOF: true
45+
MacroBlockBegin: ''
46+
MacroBlockEnd: ''
47+
MaxEmptyLinesToKeep: 2
48+
NamespaceIndentation: All
49+
SpaceAfterCStyleCast: true
50+
SpaceAfterTemplateKeyword: false
51+
SpaceBeforeRangeBasedForLoopColon: false
52+
SpaceInEmptyParentheses: false
53+
SpacesInAngles: false
54+
SpacesInConditionalStatement: false
55+
SpacesInCStyleCastParentheses: false
56+
SpacesInParentheses: false
57+
TabWidth: 4

lessons/269/app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build

lessons/269/app/CMakeLists.txt

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
cmake_minimum_required(VERSION 3.28)
2+
3+
if (APPLE)
4+
set(VCPKG_TARGET_TRIPLET "arm64-osx")
5+
elseif (UNIX)
6+
set(VCPKG_TARGET_TRIPLET "x64-linux")
7+
endif ()
8+
9+
project(App VERSION 0.1.0)
10+
11+
# Set C++ standard to C++20 for all targets
12+
set(CMAKE_CXX_STANDARD 20)
13+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
14+
set(CMAKE_CXX_EXTENSIONS OFF)
15+
16+
add_executable(udp_server src/udp_server.cpp)
17+
add_executable(udp_client src/udp_client.cpp)
18+
19+
# Add libraries
20+
add_library(utils STATIC src/utils/utils.hpp src/utils/utils.cpp)
21+
22+
find_package(prometheus-cpp CONFIG REQUIRED)
23+
24+
# Link libraries
25+
target_link_libraries(utils
26+
PRIVATE
27+
prometheus-cpp::core
28+
prometheus-cpp::pull
29+
prometheus-cpp::util
30+
)
31+
32+
target_link_libraries(udp_client
33+
PRIVATE
34+
prometheus-cpp::core
35+
prometheus-cpp::pull
36+
prometheus-cpp::util
37+
utils
38+
)
39+
40+
target_link_libraries(udp_server
41+
PRIVATE
42+
prometheus-cpp::core
43+
prometheus-cpp::pull
44+
prometheus-cpp::util
45+
utils
46+
)

lessons/269/app/CMakePresets.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": 2,
3+
"configurePresets": [
4+
{
5+
"name": "vcpkg",
6+
"generator": "Ninja",
7+
"binaryDir": "${sourceDir}/build",
8+
"cacheVariables": {
9+
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
10+
}
11+
}
12+
]
13+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 2,
3+
"configurePresets": [
4+
{
5+
"name": "default",
6+
"inherits": "vcpkg",
7+
"environment": {
8+
"VCPKG_ROOT": "$env{HOME}/devel/vcpkg"
9+
}
10+
}
11+
]
12+
}

0 commit comments

Comments
 (0)