惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
WordPress大学
WordPress大学
小众软件
小众软件
云风的 BLOG
云风的 BLOG
IT之家
IT之家
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
T
Tailwind CSS Blog
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
宝玉的分享
宝玉的分享
博客园 - Franky
F
Fortinet All Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
D
Docker
博客园 - 聂微东
C
Check Point Blog
H
Help Net Security

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Dev Log: 2026-06-22 — Configurable Schedulers, Load-Test ...
Nasrul Hazim Bin Mohamad · 2026-06-23 · via DEV Community

Some days the work spreads across a few projects instead of landing as one big feature. Today was that — three distinct threads, each with a lesson worth keeping. I'll keep things generic and teach the pattern rather than the project, but the through-line is the same: move things that were hardcoded or ephemeral into something you can configure, repeat, and trust.

Thread 1 — Make scheduled tasks configurable instead of code-only

If you've run a Laravel app for any length of time, you know the scheduler lives in code: routes/console.php or the kernel, a wall of ->daily(), ->everyFiveMinutes(), ->cron(...). That's fine until the day an operator — not a developer — needs to change when something runs. Then you're shipping a deploy just to nudge a cron expression. Silly.

Today's work pulled scheduler configuration into a settings-backed UI. The pattern is worth stealing: instead of the schedule being a literal in code, the code reads its cadence from a settings store, and there's an admin screen to edit it.

// Instead of a hardcoded cadence...
$schedule->command('subscriptions:reconcile')->daily();

// ...read it from settings, with a sane default baked in.
$schedule->command('subscriptions:reconcile')
    ->cron($this->schedulerSettings->reconcileCron ?? '0 2 * * *');

Two things made this clean. First, a SchedulerSettings object (Spatie's settings pattern) so the values are typed, cached, and migratable — not loose rows you Setting::get('...') by string key. Second, grouping the more user-facing schedules behind their own modal rather than dumping every cron in one giant form. A subscription-related schedule belongs next to subscriptions; a platform schedule belongs in admin. Same data, but organized by who needs to touch it.

The edge case to watch: a UI-editable cron is a foot-gun if you let people type nonsense. Validate the expression on save, and always keep a default so a blank setting can never silently disable a job.

Thread 2 — A load-testing toolkit is documentation you can run

The second thread was building out a load-testing toolkit with capacity-planning notes for predictable peak periods — the kind of seasonal spikes where traffic is 10x normal for a known window.

Here's the mindset shift I want to pass on: a load test isn't a one-off you run in a panic before a big day. It's a committed artifact — scripted scenarios, a runner, a comparison step, all in the repo. The value isn't just the numbers; it's that "what does the system do at peak?" becomes a command anyone can run, not tribal knowledge in one engineer's head.

The structure that worked: separate scenario configs for each traffic profile (normal hours vs. a couple of distinct peak shapes), a shared library of common setup, a single runner that takes a scenario, and a compare script so you can put two runs side by side. Capacity planning then lives as a markdown doc next to the scripts — assumptions written down, so next quarter you're updating a document instead of re-deriving everything.

The teachable bit: when you script peak scenarios explicitly, you're forced to name your assumptions — expected concurrent users, request mix, acceptable p95. That act of naming is half the value. A vague "it should handle the spike" becomes "here's the profile, here's the run, here's where it bent."

Thread 3 — An MCP server, done with auth taken seriously

The biggest thread was wiring a Model Context Protocol (MCP) server into a Laravel app so AI agents can call typed, permission-checked tools instead of poking at the UI. I gave this its own full write-up because the auth story deserves the space — dual authentication (Sanctum for first-party callers, OAuth 2.1 for delegated third-party agents), every tool mapped to an RBAC ability, and outputs trimmed to deliberate projections so a tool can't leak a whole model.

The one-line version: an MCP server is a reception desk for AI agents — check who they are, check what they're allowed to do, perform exactly one named task, hand back a structured answer. Everything else stays behind the desk. (Full breakdown in the focused post.)

The thread that ties them together

Configurable schedulers, committed load tests, a tool-based AI surface — on the face of it, unrelated. But they're the same instinct three times: take something that was implicit (a cadence buried in code, peak behavior that lived in someone's memory, "the AI can sort of use our API") and make it explicit and operable — configured, scripted, authorized. That's most of what "making a system mature" actually means.

What's next: validating those UI-editable cron expressions hard, and tightening the OAuth consent step on the MCP path.