# krowdev — Full Content > Snapshot 2026-05-10 --- # massdns Rate Limit Flags: -q, --max-qps, --max-queries URL: https://krowdev.com/snippet/massdns-rate-limit-flags/ Kind: snippet | Maturity: budding | Origin: ai-drafted Author: Agent | Directed by: krow Tags: dns, networking, reference, rate-limiting > What --max-qps, -q, --max-queries actually do in massdns — the queries-per-second flag, in-flight slot limit, and how to pick values that don't melt your resolver. ## Agent Context - Canonical: https://krowdev.com/snippet/massdns-rate-limit-flags/ - Markdown: https://krowdev.com/snippet/massdns-rate-limit-flags.md - Full corpus: https://krowdev.com/llms-full.txt - Kind: snippet - Maturity: budding - Confidence: high - Origin: ai-drafted - Author: Agent - Directed by: krow - Published: 2026-05-10 - Modified: 2026-05-10 - Words: 509 (3 min read) - Tags: dns, networking, reference, rate-limiting - Related: go-dns-scanner-4000qps, aimd-rate-limiting, dns-resolution-full-picture - Content map: - h2: TL;DR - h2: Common confusions - h2: Sane starting values - h2: When to step beyond --max-qps - h2: Sources - Crawl policy: same canonical content is exposed through HTML, Markdown, and llms-full; no crawler-specific content gate. [massdns](https://github.com/blechschmidt/massdns) is a high-performance DNS stub resolver that can reach 350,000+ queries per second. Two flags control rate, and they are easy to confuse. ## TL;DR | Flag | Long form | Default | What it limits | |---|---|---|---| | `-q` | none | unlimited | Quiet mode (no progress output). **Not** queries-per-second. | | `--max-qps N` | `--max-qps N` | 0 (no limit) | Maximum **queries per second** sent across all resolvers. | | `-s N` | `--hashmap-size N` | 10000 | Maximum number of **in-flight queries** (the slot pool / hashmap size). | | `-i N` | `--interval N` | 500 | Resend interval in **milliseconds** for unanswered queries. | | `-r FILE` | `--resolvers FILE` | required | Path to resolver list. Throughput scales with resolver count, not just `--max-qps`. | There is **no** `--qps`, `--max-queries`, or `--maximum-queries-per-second` flag. The single rate knob is `--max-qps`. ## Common confusions **`-q` is not "queries per second".** It's the quiet flag — suppresses the per-second progress bar. Easy mistake because the long-form for the rate limit is `--max-qps`, which you might shorthand in your head as `-q`. **Maximum queries per second != maximum in-flight queries.** `--max-qps 1000` sends 1000 new queries per wall-clock second. `-s 10000` allows 10,000 unanswered queries to be outstanding at any moment. With slow upstream resolvers and a tight `--max-qps`, you can saturate the slot pool long before you hit the QPS ceiling — bumping `-s` is what unblocks throughput in that case. **Resolver count caps real-world QPS.** Each resolver in your list gets queries round-robin. If `--max-qps` is 4000 but you only have 20 healthy resolvers in `-r resolvers.txt`, every resolver eats 200 qps — most public resolvers will rate-limit you well below that. Either lower `--max-qps` or use a longer resolver list (the [Public DNS Server List](https://public-dns.info/) is a common starting point, though most entries are unstable). ## Sane starting values ```bash massdns \ -r resolvers.txt \ -t A \ -o S \ --max-qps 1000 \ -s 10000 \ -i 500 \ domains.txt > results.txt ``` - `--max-qps 1000` — conservative; raise once you're confident in your resolver list. - `-s 10000` (default) — fine for most workloads; raise to 50000+ for slow resolvers / WAN-heavy lookups. - `-i 500` — 500 ms retry interval; lower if you're using fast local resolvers, raise (1000–2000) if you're hammering public infrastructure. ## When to step beyond `--max-qps` `--max-qps` is a fixed ceiling. If you want **adaptive** rate control that backs off on errors and probes upward on success, that's the [AIMD rate limiting](/note/aimd-rate-limiting/) pattern — TCP congestion control applied to a DNS scanner. Useful when you don't know the ceiling in advance. For the architectural side — **why** Go can match massdns's per-thread efficiency by going single-process-multi-goroutine — see [Building a High-Throughput DNS Scanner in Go](/article/go-dns-scanner-4000qps/). ## Sources - [`man massdns`](https://github.com/blechschmidt/massdns#usage) — official flag reference (B. Blechschmidt) - [`zdns`](https://github.com/zmap/zdns) — Go-based alternative from ZMap; flags are different but solves the same problem - [DNS Resolution: The Full Picture](/guide/dns-resolution-full-picture/) — what's actually happening behind each query --- # Bare Element Selectors vs Library HTML URL: https://krowdev.com/snippet/bare-selectors-vs-library-html/ Kind: snippet | Maturity: budding | Origin: ai-drafted Author: Agent | Directed by: krow Tags: css, astro, patterns > How bare tag selectors in a global stylesheet collide with third-party library HTML — the box-model stacking trap and a specificity ladder for fixes. ## Agent Context - Canonical: https://krowdev.com/snippet/bare-selectors-vs-library-html/ - Markdown: https://krowdev.com/snippet/bare-selectors-vs-library-html.md - Full corpus: https://krowdev.com/llms-full.txt - Kind: snippet - Maturity: budding - Confidence: high - Origin: ai-drafted - Author: Agent - Directed by: krow - Published: 2026-04-18 - Modified: 2026-04-21 - Words: 656 (3 min read) - Tags: css, astro, patterns - Related: css-collision-visualized, astro-mental-model - Content map: - h2: Rule - h2: Mechanism - h2: Common collision families - h2: Specificity ladder for fixes - h2: Diagnostic - h2: Related - h2: Sources - Crawl policy: same canonical content is exposed through HTML, Markdown, and llms-full; no crawler-specific content gate. ## Rule Bare semantic element selectors in global CSS apply to every matching element in the document, including HTML emitted by third-party libraries. Box-model properties (`padding`, `border`, `margin`) on different boxes **stack** rather than override. ## Mechanism - A bare `tag {}` rule has specificity `(0,0,1)` and matches any element of that type, regardless of ancestry. - Library CSS typically sets only the properties it cares about; untouched properties cascade through from the global rule. - When both the outer library element *and* an inner library element carry padding or border, the two box models add — the user sees doubled spacing or a visible double line. ## Common collision families | Bare rule | Likely library producer | Typical effect | |---|---|---| | `pre { padding, border, background }` | Syntax-highlighter frames (Expressive Code, Shiki, Prism) | Padding stacks against the inner code line; border draws under the frame's titlebar border; background diverges from the highlighter's theme. | | `:not(pre) > code { background, border }` | Highlighter frame captions, markdown inline code emitted inside library wrappers | Chip styling applied twice once a library wraps the code in an extra element. | | `p { max-width: 68ch }` | Search result cards, highlighter captions, callout bodies | Prose measure applied to compact UI cards; text clips short of the container it lives in. | | `ul, ol { padding-left, max-width }` | Header nav, mobile menu, footer, sidebar ToC, search facets | Structural lists inherit prose indent and width cap; every component has to override. | | `blockquote { border-left, padding }` | Markdown `>` quotes vs callout directives | Neutral quote renders identical to a styled callout, defeating the semantic distinction. | | `table, th, td { padding, border }` | Embedded or library-rendered tables | Prose padding on tables that were meant to be dense UI. | | `a { color, text-decoration }` | Nav, footer, ToC, breadcrumbs, pagination | Every structural link becomes prose-styled; every component needs an override. | | `img { max-width: 100% }` | Logos, icons, fixed-size component images | Intrinsic-size images get constrained to their container. | None of these are bugs in the libraries — they're bugs in the global stylesheet's assumption that every matching element is prose. ## Specificity ladder for fixes 1. **Delete.** If no legitimate prose consumer exists (e.g. every `
` on the site is highlighter output with zero raw consumers), the rule has no job. The library owns inner styling via its own config.
2. **Scope to a content wrapper.** Move rules into a layout-scoped `
```

**What happens if you forget the Props interface?**

TypeScript won't catch incorrect prop usage at build time. You'll get `undefined` instead of a type error. Always define the interface — it's your safety net.

## Code View Tabs

The Source / Compiled / Rendered pattern for showing how Astro transforms code:

src/components/Badge.astro

```astro --- interface Props { label: string; color?: string; } const { label, color = 'var(--accent)' } = Astro.props; --- {label} ```
```html beginner ```
The compiled output shows Astro's scoped CSS in action. The `data-astro-cid-x7q2k1` attribute uniquely identifies this component instance, ensuring styles never leak to other elements. ## Sources - Astro Docs, [MDX integration](https://docs.astro.build/en/guides/integrations-guide/mdx/) - Astro Docs, [Styles and CSS](https://docs.astro.build/en/guides/styling/) - Expressive Code, [Installing Expressive Code](https://expressive-code.com/installation/) - Expressive Code, [Collapsible Sections](https://expressive-code.com/plugins/collapsible-sections/) --- # Getting Started with Agentic Coding URL: https://krowdev.com/guide/agentic-coding-getting-started/ Kind: guide | Maturity: budding | Origin: ai-drafted Author: Agent | Directed by: krow Tags: agentic-coding, fundamentals > What agentic coding is, why it matters, and how to start using AI coding agents effectively. ## Agent Context - Canonical: https://krowdev.com/guide/agentic-coding-getting-started/ - Markdown: https://krowdev.com/guide/agentic-coding-getting-started.md - Full corpus: https://krowdev.com/llms-full.txt - Kind: guide - Maturity: budding - Confidence: high - Origin: ai-drafted - Author: Agent - Directed by: krow - Published: 2026-03-15 - Modified: 2026-04-21 - Words: 640 (3 min read) - Tags: agentic-coding, fundamentals - Related: claude-md-patterns, reviewing-ai-generated-code, astro-mental-model, building-krowdev-with-agents - Content map: - h2: What Makes It "Agentic"? - h2: What Agents Are Good At - h2: What Agents Struggle With - h2: Core Patterns - h2: Start Here - h2: Sources - Crawl policy: same canonical content is exposed through HTML, Markdown, and llms-full; no crawler-specific content gate. Agentic coding is the practice of using AI agents — like [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Codex CLI](https://github.com/openai/codex), or [Cursor](https://cursor.com) — as active collaborators in the development process, rather than just autocomplete tools. This guide covers what it is, how it differs from traditional AI coding, and how to start effectively. ## What Makes It "Agentic"? The key difference from traditional AI-assisted coding: | | Traditional AI Assist | Agentic Coding | |---|---|---| | **Scope** | Single lines / functions | Entire features across files | | **Interaction** | You type, it autocompletes | You describe intent, it plans and executes | | **Context** | Current file only | Reads your codebase, project rules, docs | | **Memory** | None between prompts | Session context, CLAUDE.md, memory files | | **Decision-making** | You drive everything | Agent makes decisions, you review | | **Tool use** | Suggestions only | Reads files, runs commands, creates PRs | The shift is from "smarter autocomplete" to "junior developer that works fast, reads everything, and needs code review." ## What Agents Are Good At Based on real experience [building krowdev](/article/building-krowdev-with-agents/) and WebTerminal: - **Reading large codebases fast** — an agent analyzed 11 terminal emulator source repos in hours, extracting architecture patterns that would take weeks manually - **Consistent formatting and boilerplate** — schema definitions, test scaffolds, CSS custom properties - **Cross-file refactors** — renaming a concept across 15 files, updating imports, fixing references - **Research synthesis** — reading docs, comparing approaches, summarizing trade-offs (see [Parallel AI Research Pipelines](/article/parallel-ai-research-pipelines/) for how this scales) - **Mechanical work you understand** — "add breadcrumbs to every entry page" when you know exactly what breadcrumbs should look like ## What Agents Struggle With - **Taste and judgment** — they'll over-engineer, add unnecessary abstractions, and optimize things that don't need optimizing - **Knowing when to stop** — without constraints, they'll keep "improving" code until it's unrecognizable - **Your project's history** — they don't know why a decision was made, only what the code looks like now - **Novel architecture** — they recombine patterns from training data, they don't invent genuinely new approaches - **Subtle bugs** — they're confident, not careful. Their code works on the happy path but may miss edge cases ## Core Patterns This knowledge base documents the patterns that make agentic coding work: - **Prompt Patterns** — getting better results from each interaction - **Context Management** — feeding agents the right information (see [Writing an Effective CLAUDE.md](/guide/claude-md-patterns/)) - **Code Review** — systematic review of agent output (see [Reviewing AI-Generated Code](/guide/reviewing-ai-generated-code/)) ## Start Here **Your first agentic task should be small, well-defined, and reviewable:** 1. **Pick a task you already know how to do** — so you can evaluate the agent's output. A bug fix, a utility function, a styling change. 2. **Write a clear prompt** describing the *what* and *why*, not the *how*. "Add a 404 page that matches the site design with links back to the homepage and explore page" is better than "create src/pages/404.astro with an h1 and two anchor tags." 3. **Let the agent propose before it builds.** If you're using plan mode or asking for an approach first, you catch bad ideas before they become bad code. 4. **Review the output like a code review.** Read every changed line. Agents are confident — they'll commit to an approach even when it's wrong. Your job is to catch the 10% that's subtly incorrect. 5. **Document what you learn.** The prompt that worked, the constraint that prevented over-engineering, the anti-pattern that wasted an hour. That's what this knowledge base is for. **Your second task should use CLAUDE.md.** Create a project rules file before starting. Even 10 lines of stack + conventions context dramatically improves output quality. See [Writing an Effective CLAUDE.md](/guide/claude-md-patterns/) for patterns. ## Sources - Anthropic, [Claude Code overview](https://code.claude.com/docs/en/overview) - Anthropic, [Common workflows](https://code.claude.com/docs/en/common-workflows) - OpenAI, [Codex web](https://developers.openai.com/codex/cloud) --- # The Mental Model URL: https://krowdev.com/guide/astro-mental-model/ Kind: guide | Maturity: evergreen | Origin: ai-drafted Author: Agent | Directed by: krow Tags: astro, fundamentals > What Astro actually is — a compiler, not a server. The single concept that makes everything else click. ## Agent Context - Canonical: https://krowdev.com/guide/astro-mental-model/ - Markdown: https://krowdev.com/guide/astro-mental-model.md - Full corpus: https://krowdev.com/llms-full.txt - Kind: guide - Maturity: evergreen - Confidence: high - Origin: ai-drafted - Author: Agent - Directed by: krow - Published: 2026-03-15 - Modified: 2026-04-21 - Words: 589 (3 min read) - Tags: astro, fundamentals - Related: agentic-coding-getting-started, interactive-features-showcase - Content map: - h2: Astro Is a Compiler - h2: What "Static Site Generator" Means - h2: The Two Phases - h2: Build Time Is Your Superpower - h2: Sources - Crawl policy: same canonical content is exposed through HTML, Markdown, and llms-full; no crawler-specific content gate. ## Astro Is a Compiler Astro is **not** a web server. It's a compiler — like LaTeX or a C compiler. You feed it source files, it outputs finished HTML. :::analogy **LaTeX:** `.tex` files → `pdflatex` → `.pdf` files you distribute **Astro:** `.astro` + `.md` files → `astro build` → `.html` + `.css` files you upload ::: The output (`dist/` folder) is a pile of static files. No Python process running, no database, no server-side logic. Cloudflare (or any host) just serves files — like putting PDFs on a file server. ## What "Static Site Generator" Means The term is literal: 1. **Static** — the output is fixed HTML files, not dynamically generated per request 2. **Site** — a collection of web pages 3. **Generator** — a program that produces them from source templates When someone visits `krowdev.pages.dev/article/welcome-to-krowdev/`, Cloudflare finds `dist/article/welcome-to-krowdev/index.html` and sends it. No code runs. It's as fast as file serving can be. ## The Two Phases Everything in Astro happens in one of two phases: | Phase | When | Where | What Runs | |---|---|---|---| | **Build time** | When you run `npm run build` | Your machine or CI | All your Astro/TS code, markdown processing, image optimization | | **Runtime** | When someone visits the site | User's browser | Only explicit `