Security

Real offensive depth

Testing and defence led by a published security researcher with five CVEs, including a CVSS 9.1 Mirai botnet kill-switch.

All security →
Compliance

Audit-ready, fixed scope

SOC 2, ISO, and the Canadian privacy stack, run end to end with an independent auditor.

All frameworks →
Resources

Learn the space

Original research, free tools, and plain-language guides on security and compliance, from a published security researcher.

Read the blog →
Security

Scaling Infrastructure Without Scaling Costs

One of the most common problems we see at growing startups is an AWS or GCP bill that scales linearly with user growth. Double the users, double the infrastructure cost. This might seem inevitable, but it is not. With the right architecture and cost discipline, you can scale your user base 10x while your infrastructure cost grows by 2x or 3x.

Right-size your compute

The most impactful change you can make is right-sizing your instances. Most startups over-provision because they picked an instance size early on and never revisited it. An m5.xlarge running at 15% CPU utilization is wasting 85% of your compute spend.

Use your cloud provider's right-sizing recommendations (AWS Compute Optimizer, GCP Recommender) to identify over-provisioned resources. Then resize them. This alone typically saves 30 to 50% on compute costs.

For variable workloads, use autoscaling. Set up scaling policies based on CPU, memory, or request count. Scale out when demand increases and scale in when it decreases. You should not be paying for peak capacity at 3 AM when nobody is using your application.

Use reserved instances and savings plans

If you have a baseline load that is always running, pay for it upfront. AWS Reserved Instances and Savings Plans offer 30 to 60% discounts compared to on-demand pricing. The commitment is typically 1 or 3 years.

The strategy: cover your baseline with reserved capacity and use on-demand or spot instances for variable load. For batch processing or stateless workloads, spot instances offer 60 to 90% savings compared to on-demand.

Optimize your database

Database costs are often the second-largest line item after compute. Here are the high-impact optimizations:

Add proper indexes. A missing index on a frequently queried column can cause your database to do full table scans, which requires more CPU, more memory, and a larger instance. Use your database's query analyzer to find slow queries and add indexes.

Implement caching. Put Redis or Memcached in front of your database for frequently accessed, rarely changed data. User profiles, configuration settings, and permission lists are prime candidates. A $50/month Redis instance can reduce database load by 80%.

Archive old data. If you have a table with millions of rows but only query the last 90 days, move older data to cold storage (S3, BigQuery). This reduces your active dataset size, which means a smaller database instance, faster queries, and lower backup costs.

Use read replicas. If your application is read-heavy (most SaaS apps are), add a read replica and route read queries to it. This allows you to keep your primary database instance smaller while handling more total load.

Want this handled? Tell us what your buyer is asking for and we will tell you what the work involves, what it costs, and what you can do yourself. Talk to us

CDN and edge caching

If you are serving static assets (images, CSS, JavaScript) from your application servers, stop. Put CloudFront, Cloudflare, or Fastly in front of your application. Every request served from the CDN edge is a request your servers do not have to handle.

For API responses that do not change frequently (product catalogs, public content), add cache-control headers and let the CDN cache them. This can reduce your origin server load by 50 to 80% for read-heavy workloads.

Review your storage costs

S3 storage is cheap. S3 request costs are not. If you have millions of small objects that are accessed frequently, the GET request charges can exceed the storage charges. Consider combining small files, using S3 Intelligent-Tiering, or moving infrequently accessed data to S3 Glacier.

Log storage is another common cost driver. If you are shipping logs to a SaaS provider like Datadog or Splunk, you might be paying $2 to $5 per GB ingested. Set log levels appropriately (do not log debug-level messages in production), add sampling for high-volume logs, and set retention policies that match your actual needs.

Kill zombie resources

Every startup has them: unused Elastic IPs, detached EBS volumes, idle load balancers, forgotten EC2 instances running in a development account. These zombie resources can add up to thousands of dollars per month.

Run a monthly audit. Use tools like AWS Cost Explorer, Infracost, or Spot.io to identify unused resources. Tag everything with an owner and a purpose. If something does not have a tag, investigate and delete it.

Build cost awareness into your culture

The most effective cost optimization is cultural. Share the cloud bill with your engineering team monthly. Set a per-team or per-service cost budget. Include cost considerations in architecture reviews. When a developer proposes a solution, they should be able to answer "what will this cost at 10x scale?"

Infrastructure cost is not just a finance problem. It is an engineering problem. The teams that treat it as such are the ones that scale efficiently.

If your cloud bill is growing faster than your revenue, talk to us. We typically find 30 to 50% savings in our first infrastructure review.

Measure cost per unit, not cost per month

A bill that grows is not evidence of a problem, and a bill that shrinks is not evidence of success. The number that tells you whether the architecture is scaling is cost per unit of the thing you sell: cost per tenant, per active user, per million API requests, per document processed. Pick the one your revenue is priced against so that infrastructure cost and revenue move in comparable terms.

Getting there needs allocation, and allocation needs tags. A workable minimum is four dimensions on every resource: environment, service, team, and customer tier where multi-tenancy makes that meaningful. Enforce them at creation time through your infrastructure-as-code modules rather than through a policy document, because a tagging standard that depends on people remembering will be about sixty percent complete within a quarter.

Once allocation exists, publish a monthly figure per service alongside its traffic. The teams that catch cost regressions early are the ones where a service owner can see that their cost per thousand requests went from eleven cents to nineteen after last month's release. Nobody catches that in a total.

Data transfer is the line item nobody budgeted

Compute and storage get attention because they have obvious names. Network charges hide inside categories that read like noise until you split them out.

Cross-availability-zone traffic. Chatty services spread across zones for resilience pay per gigabyte in both directions. A microservice mesh with heavy internal calls can spend more moving bytes between zones than it spends on the instances running the code. Zone-aware routing, where a service prefers a healthy local instance and only crosses zones on failure, often removes most of it without touching your resilience posture.

NAT gateways. Every byte a private-subnet workload pulls from the internet, including container image pulls and package installs on every deploy, passes through a metered gateway with an hourly charge on top. Teams with busy build pipelines regularly find four figures a month here. VPC endpoints for the cloud services you call most, plus an internal image registry cache, take most of it away.

Egress to the internet. If you serve large files or stream data to customers, egress is the dominant cost at scale and it barely appears in early-stage bills. This is the item that most often breaks a pricing model, since a customer paying a flat monthly fee can pull an unbounded volume. Model it before you sign a large contract, not after.

Managed services: convenience with a meter attached

Managed offerings are usually worth their premium at small scale because they replace work you cannot afford to do. The premium stops being obviously worth it at a size that varies by service, and the crossover is worth calculating rather than assuming.

Serverless functions are excellent below a few million invocations a month and start losing to a modestly sized container fleet somewhere above that, depending on execution duration and memory. Managed queues and event buses charge per message, which is fine until an event-per-keystroke design ships. Managed search and analytics services often bill on ingest volume, so a debug field added to an indexed document can move the bill without anyone noticing a code change.

The discipline is to know the metering unit for every managed service you use and to check whether any of them are metered on something a developer can multiply accidentally. Per-request, per-message, per-gigabyte-ingested and per-index-document are the four that catch people.

Container platforms and the bin-packing problem

Kubernetes clusters run at low utilization for a specific and fixable reason: requests are set from guesswork, usually copied from another service, and the scheduler places pods against requests rather than actual usage. A cluster at twenty percent real CPU utilization with no schedulable capacity left is a bin-packing failure, not a capacity problem.

Fix it by setting requests from observed usage at a sensible percentile rather than from a template, keeping limits well above requests for burstable workloads, and letting a vertical autoscaler recommend values even if you apply them manually. Then look at node shape. A cluster of many small nodes wastes a fixed system overhead on each one, while very large nodes make the scheduler's job easier but make a single node failure more expensive.

Processor architecture is the single largest easy win available right now. Moving stateless services to ARM-based instances typically cuts compute cost by a quarter or so at equal or better performance, and for most interpreted or JIT-compiled stacks the migration is a multi-architecture build plus a careful look at any native dependencies. Do one service first, compare latency at the ninety-ninth percentile rather than the average, and roll on from there.

One database detail belongs here because it is a container-era problem rather than a database problem. Every pod carries its own connection pool, so scaling a service from ten pods to sixty multiplies open connections by six even though query volume may have barely moved. Postgres in particular allocates real memory per connection, and the usual response is to move the database to a larger instance to survive the connection count. A pooler in front of the database, sized to the work rather than to the pod count, is frequently the difference between two instance sizes and costs a few dollars a month to run.

Observability costs scale with cardinality, not with traffic

The existing advice about log volume holds, and the sharper version is about cardinality. Metrics platforms bill for unique time series, and a unique series is created by every distinct combination of label values. Add a label carrying a user identifier, a request identifier, or a full URL path with identifiers embedded in it, and one metric becomes hundreds of thousands of series overnight.

Three habits keep this contained. Never put unbounded values in metric labels, and template path segments so that a route becomes one series rather than one per resource. Sample traces at a rate that keeps tail visibility, since head-based sampling at a low percentage will hide exactly the slow requests you needed. Separate retention by class: short retention for verbose application logs, longer retention for the audit and access logs you have a real reason to keep.

That last split matters beyond cost, which is the next section.

The cuts that break your compliance position

Cost work goes wrong when it quietly removes a control. Four cuts come up repeatedly, and every one of them has appeared in a readiness assessment where the client was surprised.

Log retention shortened below the commitment. Your policies, your customer contracts and your SOC 2 system description probably state a retention period. Dropping audit logs to thirty days to save money while the policy says one year gives an auditor a clean exception and gives an incident responder nothing to work with. If the cost is genuinely unaffordable, change the policy through your governance process and tell the customers whose contracts reference it, rather than changing the setting.

Collapsing to a single availability zone. Cheaper, and defensible for some workloads, but if you have sold an availability commitment or included the availability criterion in your SOC 2 scope, that is a control decision rather than an engineering one. Document the decision and its risk acceptance.

Deleting non-production environments and testing in production. This saves real money and undermines your change management control, which is usually the control with the most auditor attention after access management.

Turning off the web application firewall or the vulnerability scanner during a cost push. Both show up as line items with no obvious traffic attached, which makes them easy targets, and both are typically named in a control or a customer contract. If they are genuinely not earning their cost, replace them consciously and record what replaced them. Our security work exists partly because these decisions get made in a spreadsheet and only surface a year later in an audit.

The general rule: any cost change that touches logging, retention, redundancy, environment separation or a security tool needs to be reviewed against your control set before it is merged. That review costs an hour and prevents a finding.

Rightsizing and autoscaling failure modes

Rightsizing recommendations are generated from historical averages, and averages hide the shape of your traffic. Two specific failures recur. Memory-bound workloads get resized on CPU utilization and start swapping or getting killed under load, which appears as intermittent errors rather than a clear regression. Burst-capable instance types get selected for services with sustained load, run out of accumulated credits after a few weeks, and degrade at exactly the moment traffic grows.

Autoscaling has its own set. Scaling on average CPU across a group hides one saturated instance. Scale-in that is more aggressive than scale-out produces oscillation, where the group removes capacity into a traffic ramp and then thrashes. Applications with slow start-up, big JVM warmups or heavy container images cannot scale fast enough to be protected by a reactive policy at all, and need either faster starts or a scheduled floor ahead of known peaks.

Spot capacity is the highest-value and highest-discipline option. It works when the workload tolerates a two-minute eviction notice, spreads across several instance types and zones, and drains connections cleanly. It fails badly for stateful services, long-running jobs with no checkpointing, and anything sitting in the synchronous path of a user request without an on-demand fallback.

When not to do this work

Cost optimization has a cost, and for a lot of companies the honest answer is to leave the bill alone for another year.

Before product-market fit, engineering hours are the scarcest resource you have and infrastructure is usually a small fraction of payroll. A week spent shaving thirty percent off an eight thousand dollar monthly bill returns less than a week spent on the feature that closes the next three deals. Set a threshold instead: revisit when the bill passes a number you choose in advance, or when it exceeds a set share of revenue.

Do not buy long commitments before your architecture has settled. A three-year commitment against an instance family you are about to migrate away from converts a discount into a stranded cost, and the resale market for those commitments is thin. One-year terms, or flexible savings plans that apply across instance families, cost slightly more and preserve the ability to change your mind.

Do not build a chargeback model at thirty people. Visibility works, and formal internal billing at small scale mostly produces argument and creative accounting. Showback, meaning teams can see their numbers without being invoiced for them, gets almost all of the behavioral benefit.

And if the real problem is that a customer or an auditor is asking questions about resilience, retention or segregation, that is a different piece of work with a different answer. Tell us what is being asked and we will say whether it is an architecture question, a control question, or something you can settle with a paragraph and an existing log export. Where the answer turns out to be ongoing, our retainer work covers the review cadence, and where it does not, we will say that too.

Want this handled? Tell us what your buyer is asking for and we will tell you what the work involves, what it costs, and what you can do yourself.

Talk to usOr talk about a retainer

What we charge for this. The figures above are market ranges. Our own fixed-scope prices are on the pricing page, alongside every cost breakdown we have written.

Before you go

Want the rest of this by email?

If this was useful, I send a few short notes on security posture. Unsubscribe in one click, and replies reach me directly.

From Jacob Masse, principal of traztech. No spam, unsubscribe in one click.

Want a second opinion on where you stand?

We run SOC 2, ISO 27001 and the rest of the compliance stack for startups and SMEs, and the security testing that sits behind it. The first call is free, and we will tell you if you are not ready to start yet.

Book a free call

Track record

Who is actually doing the work

5
Published CVEs, including a CVSS 9.1
76
Controls taken from nothing to a passed SOC 2 Type II
Zero
Exceptions on that Type II report
20+
Penetration testing engagements delivered

Published vulnerability research

Five published CVEs. CVE-2024-45163 (CVSS 9.1) is a flaw in the Mirai botnet itself, which gave defenders a way to shut down attacker infrastructure. CVE-2026-42626 takes HP ENVY 5000 printers offline from any unauthenticated device on the same network.

A SOC 2 Type II built from nothing

At Humera, a venture-backed US security company, Jacob built the compliance programme in-house from nothing: no report, no policies, no documented controls. It ended in a Type II attestation across 76 controls with zero exceptions, on a team of 15.