Skip to content

Commit

Permalink
Merge pull request #484 from vtex-apps/chore/changeCache
Browse files Browse the repository at this point in the history
Optimize local cache and Change Min number of replicas
  • Loading branch information
salesfelipe authored Feb 4, 2025
2 parents 3a00df7 + 88aebf3 commit a3642da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Changed

- Set minimum replicas to 5.
- Increased search cache size.
- Reduced apps cache size.

## [1.74.0] - 2025-01-29

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

// Segments are small and immutable.
const segmentCache = new LRUCache<string, Cached>({ max: 1000 })
const searchCache = new LRUCache<string, Cached>({ max: 3000 })
const searchCache = new LRUCache<string, Cached>({ max: 6000 })
const messagesCache = new LRUCache<string, Cached>({ max: 3000 })
const vbaseCache = new LRUCache<string, Cached>({ max: 3000 })
const appsCache = new LRUCache<string, Cached>({ max: 3000 })
const appsCache = new LRUCache<string, Cached>({ max: 1500 })

metrics.trackCache('segment', segmentCache)
metrics.trackCache('search', searchCache)
Expand Down
2 changes: 1 addition & 1 deletion node/service.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"ttl": 60,
"timeout": 12,
"minReplicas": 10,
"minReplicas": 5,
"maxReplicas": 250,
"workers": 2,
"routes": {
Expand Down

0 comments on commit a3642da

Please sign in to comment.