Simple beats clever
- Small surface-area APIs with explicit contracts
- Readable schemas, real names, docstrings
- Single owners, single sources of truth
Schemas, APIs, deploys, observability β shipped the dependable way.
SSR/SPA setups that load fast and are a joy to maintain.
PostgreSQL first, indexes shaped by queries, safe migrations.
OpenAPI/GraphQL, strong typing, rate limits, testable stubs.
Containers, IaC, rollbacks, and hooks to APM/uptime.
Real-user monitoring and targeted cache strategies.
OWASP-first with CSP, SAST/DAST, and alert drills.
# serializers.py
class ProductIn(serializers.Serializer):
sku = serializers.CharField(max_length=64)
price = serializers.DecimalField(max_digits=10, decimal_places=2)
class ProductOut(ProductIn):
id = serializers.IntegerField(read_only=True)
in_stock = serializers.BooleanField()
# views.py
class ProductViewSet(viewsets.ModelViewSet):
queryset = Product.objects.all().select_related("category")
serializer_class = ProductOut
permission_classes = [IsAuthenticated]
filterset_fields = ["sku", "category_id"]
search_fields = ["sku"]
# urls.py
router = DefaultRouter()
router.register(r"products", ProductViewSet)
urlpatterns = [path("api/", include(router.urls))]
@shared_task(bind=True, autoretry_for=(HTTPError,), retry_backoff=True)
def sync_product(self, product_id):
p = Product.objects.select_for_update().get(pk=product_id)
ext = fetch_external(p.sku) # pure function
with transaction.atomic():
Product.objects.filter(pk=p.pk).update(price=ext.price)
AuditLog.objects.create(kind="sync", ref=p.pk)
-- add index concurrently
CREATE INDEX CONCURRENTLY idx_orders_user_created
ON orders(user_id, created_at);
-- partition by month (example)
CREATE TABLE orders_2025_02 PARTITION OF orders
FOR VALUES FROM ('2025-02-01') TO ('2025-03-01');
client βββΊ BFF βββΊ services
β ββ accounts
ββ cache ββ catalog
app βββΊ queue βββΊ workers
β ββ email
ββ retry ββ reports
orders_y2025_m02 (
PARTITION OF orders FOR VALUES
FROM ('2025-02-01') TO ('2025-03-01')
)
CREATE TABLE payments (
id BIGSERIAL PRIMARY KEY,
user_id BIGINT NOT NULL,
amount NUMERIC(12,2) NOT NULL,
status TEXT NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
) PARTITION BY RANGE (created_at);
type Product { id: ID!, sku: String!, price: Float!, inStock: Boolean! }
type Query { products(sku: String): [Product]! }
Adjust inputs and see how fast you burn your monthly error budget. Uses simple math with clear assumptions.
Hour | Remaining budget | Errors used |
---|
Assumes stationary error rate; use for direction, not absolutes.
Budget fraction = 1 β SLO_target
. For 99.9% SLO, budget = 0.1% of total requests in the window.
allowed = traffic_rpm Γ 60 Γ 24 Γ days Γ budget
burn = (error_rate / 100) / budget
. 1.0Γ means you use exactly your budget pace; 2.0Γ burns twice as fast.
ttr_hours = allowed / (traffic_rpm Γ 60 Γ error_rate_fraction)
Quick brief below and weβll reply within one business day.