@ts-cloud/core 0.7.32 → 0.7.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/types.d.ts +29 -0
  2. package/package.json +2 -2
package/dist/types.d.ts CHANGED
@@ -2289,6 +2289,17 @@ export interface ComputeConfig {
2289
2289
  /** Enable encryption @default true */
2290
2290
  encrypted?: boolean;
2291
2291
  };
2292
+ /**
2293
+ * Swapfile size in GB, provisioned at first boot (cloud-init / UserData).
2294
+ * Small shared boxes run several tenants + services with no swap at all, so
2295
+ * a memory spike (deploy, `bun install`, on-box builds) leaves the kernel
2296
+ * OOM killer picking victims box-wide. A modest swapfile — with a low
2297
+ * `vm.swappiness` of 10 persisted via `/etc/sysctl.d` — gives the kernel
2298
+ * headroom without trading responsiveness. The setup is idempotent and
2299
+ * skipped when the box already has `/swapfile` active. Set `0` to disable
2300
+ * (no swap provisioned). @default 2
2301
+ */
2302
+ swapGb?: number;
2292
2303
  /**
2293
2304
  * SSH key name for instance access
2294
2305
  */
@@ -2571,6 +2582,24 @@ export interface ComputeProxyConfig {
2571
2582
  * upstream; omit to use rpx's built-in default (256).
2572
2583
  */
2573
2584
  maxUpstreamConns?: number;
2585
+ /**
2586
+ * systemd `MemoryHigh` for the `rpx-gateway.service` unit — the soft limit at
2587
+ * which the kernel starts reclaiming the gateway's memory (throttling it
2588
+ * before the hard limit trips). On a shared, swap-light box this matters: the
2589
+ * gateway's own cgroup is squeezed first instead of memory pressure building
2590
+ * until the box-wide OOM killer picks an arbitrary victim (a tenant app,
2591
+ * postgres). Accepts systemd size values (`512M`, `1G`, …). @default '512M'
2592
+ */
2593
+ memoryHigh?: string;
2594
+ /**
2595
+ * systemd `MemoryMax` for the `rpx-gateway.service` unit — the hard limit.
2596
+ * Crossing it invokes the OOM killer INSIDE the gateway's cgroup, so the
2597
+ * gateway itself is the deliberate victim and the unit's `Restart=always`
2598
+ * brings it right back — a controlled blip instead of the kernel killing a
2599
+ * random co-tenant. Pair with {@link memoryHigh} (should be higher).
2600
+ * @default '768M'
2601
+ */
2602
+ memoryMax?: string;
2574
2603
  /**
2575
2604
  * Enable rpx on-demand TLS: lazily issue a real (Let's Encrypt) cert for an
2576
2605
  * approved host the first time it's needed. The site domains are used as the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ts-cloud/core",
3
- "version": "0.7.32",
3
+ "version": "0.7.34",
4
4
  "type": "module",
5
5
  "description": "Core CloudFormation generation library for ts-cloud",
6
6
  "author": "Chris Breuer <chris@stacksjs.com>",
@@ -31,7 +31,7 @@
31
31
  "typecheck": "tsc --noEmit"
32
32
  },
33
33
  "dependencies": {
34
- "@ts-cloud/aws-types": "0.7.32"
34
+ "@ts-cloud/aws-types": "0.7.34"
35
35
  },
36
36
  "devDependencies": {
37
37
  "typescript": "^7.0.2"