Skip to content

Commit

Permalink
Merge pull request #483 from vtex-apps/chore/changeScaling
Browse files Browse the repository at this point in the history
Vertical Scaling
  • Loading branch information
salesfelipe authored Jan 29, 2025
2 parents 8df0fc8 + 73c34e3 commit 686ff09
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Changed

- Pod scaling configs to use 2 vCPUs and 4Gb of memory.

## [1.73.0] - 2025-01-22

### Changed
Expand Down
4 changes: 2 additions & 2 deletions node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ const SIX_SECONDS_MS = 6 * 1000
const NINE_SECONDS_MS = 9 * 1000

// Segments are small and immutable.
const MAX_SEGMENT_CACHE = 10000
const segmentCache = new LRUCache<string, Cached>({ max: MAX_SEGMENT_CACHE })
const segmentCache = new LRUCache<string, Cached>({ max: 1000 })
const searchCache = new LRUCache<string, Cached>({ max: 3000 })
const messagesCache = new LRUCache<string, Cached>({ max: 3000 })
const vbaseCache = new LRUCache<string, Cached>({ max: 3000 })
Expand All @@ -27,6 +26,7 @@ metrics.trackCache('segment', segmentCache)
metrics.trackCache('search', searchCache)
metrics.trackCache('messages', messagesCache)
metrics.trackCache('vbase', vbaseCache)
metrics.trackCache('apps', appsCache)

export default new Service<Clients, RecorderState, CustomContext>({
clients: {
Expand Down
10 changes: 5 additions & 5 deletions node/service.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"stack": "nodejs",
"memory": 2048,
"memory": 4096,
"cpu": {
"type": "shared",
"value": 80,
"scalingPercentage": 95
"value": 200,
"scalingPercentage": 80
},
"ttl": 30,
"ttl": 60,
"timeout": 12,
"minReplicas": 30,
"minReplicas": 10,
"maxReplicas": 250,
"workers": 2,
"routes": {
Expand Down

0 comments on commit 686ff09

Please sign in to comment.