<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Field Notes</title><link>https://www.shenjianan97.com/</link>
    <description>Programming, cloud, and infrastructure notes by Jianan Shen.</description>
    <language>en</language><lastBuildDate>Fri, 20 Nov 2026 16:00:00 GMT</lastBuildDate>
    <atom:link href="https://www.shenjianan97.com/rss.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>What should a Kubernetes health check actually check?</title><link>https://www.shenjianan97.com/posts/kubernetes-health-probes/</link>
      <guid>https://www.shenjianan97.com/posts/kubernetes-health-probes/</guid><pubDate>Fri, 20 Nov 2026 16:00:00 GMT</pubDate>
      <category>Kubernetes</category><description>&lt;p&gt;A web API can be alive, warming up, and unable to serve requests at the same time. A single health endpoint flattens those states. In Kubernetes, each probe triggers a different action, so the endpoint should answer a correspondingly different question.&lt;/p&gt;
&lt;h2 id=&quot;separate-the-decisions&quot;&gt;Separate the decisions&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Startup: Has initialization finished? Use a startup probe for slow migrations, warmups, or runtimes. It gates the other probes until it succeeds.&lt;/li&gt;&lt;li&gt;Readiness: Should this replica receive new requests? Return an error while it warms up or cannot serve useful traffic. Kubernetes marks the endpoint unready.&lt;/li&gt;&lt;li&gt;Liveness: Would restarting this container help? Keep this check focused on failures local to the process, such as an event loop that has stopped processing work.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;give-startup-room&quot;&gt;Give startup room&lt;/h2&gt;
&lt;p&gt;The fragment below belongs under a container in a Pod template. The startup probe allows roughly two minutes of failed attempts. Measure your own cold start first and give it margin for realistic load.&lt;/p&gt;
&lt;div class=&quot;snippet&quot;&gt;
    &lt;div class=&quot;snippet-bar&quot;&gt;&lt;span&gt;yaml&lt;/span&gt;&lt;/div&gt;
    &lt;pre tabindex=&quot;0&quot;&gt;&lt;code&gt;startupProbe:
  httpGet:
    path: /startup
    port: 8080
  periodSeconds: 5
  failureThreshold: 24
readinessProbe:
  httpGet:
    path: /ready
    port: 8080
  periodSeconds: 5
livenessProbe:
  httpGet:
    path: /live
    port: 8080
  periodSeconds: 10
  failureThreshold: 3&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;h2 id=&quot;test-an-outage-while-it-is-safe&quot;&gt;Test an outage while it is safe&lt;/h2&gt;
&lt;p&gt;Disconnect a dependency in a test environment and watch what happens to the replicas. If every container restarts when a shared database stalls, the restart loop can make recovery harder by creating fresh connections at the worst moment. Keep that dependency out of liveness. Decide whether readiness should fail based on whether the replica can still serve anything useful.&lt;/p&gt;
&lt;p&gt;During a rollout, compare Pod events with application logs. A readiness failure explains why a running Pod receives no traffic. A rising restart count points to a different question.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Size a Pod from measurements</title><link>https://www.shenjianan97.com/posts/kubernetes-requests-and-limits/</link>
      <guid>https://www.shenjianan97.com/posts/kubernetes-requests-and-limits/</guid><pubDate>Fri, 20 Nov 2026 16:00:00 GMT</pubDate>
      <category>Kubernetes</category><description>&lt;p&gt;A Pod can sit Pending beside a node whose CPU graph looks quiet. The scheduler counts requested resources against node capacity. A low utilization graph shows recent usage, while a request reserves space in the scheduler’s accounting.&lt;/p&gt;
&lt;h2 id=&quot;start-with-the-symptom&quot;&gt;Start with the symptom&lt;/h2&gt;
&lt;div class=&quot;snippet&quot;&gt;
    &lt;div class=&quot;snippet-bar&quot;&gt;&lt;span&gt;sh&lt;/span&gt;&lt;/div&gt;
    &lt;pre tabindex=&quot;0&quot;&gt;&lt;code&gt;kubectl describe pod -n staging api-7fc86
kubectl top pod -n staging --containers
kubectl get pod -n staging api-7fc86 \
  -o jsonpath=&amp;#39;{.status.containerStatuses[*].lastState.terminated.reason}&amp;#39;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;ul&gt;&lt;li&gt;Pending with Insufficient cpu or memory: inspect the requests, node capacity, and placement constraints.&lt;/li&gt;&lt;li&gt;Running with slow responses: compare the latency trend with CPU throttling and request volume. A CPU limit can cap the time a container gets to run.&lt;/li&gt;&lt;li&gt;OOMKilled after a burst: look for memory peaks, concurrency changes, or retained allocations. The latest snapshot may miss the spike that caused the kill.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;watch-a-full-traffic-cycle&quot;&gt;Watch a full traffic cycle&lt;/h2&gt;
&lt;p&gt;Collect per-container usage during startup, a normal peak, and an unusually expensive request. Track the main process and sidecars separately. A single daily average hides allocator growth, request bursts, and batch jobs that overlap with the peak.&lt;/p&gt;
&lt;p&gt;Check the knock-on effects before lowering a request. If an autoscaler uses CPU utilization as a percentage of the request, a smaller request can make the same workload look busier. Change one setting, observe the result over a comparable window, and keep the previous values with the deployment history.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Give a deployment a way back</title><link>https://www.shenjianan97.com/posts/kubernetes-rollout-and-rollback/</link>
      <guid>https://www.shenjianan97.com/posts/kubernetes-rollout-and-rollback/</guid><pubDate>Fri, 20 Nov 2026 16:00:00 GMT</pubDate>
      <category>Kubernetes</category><description>&lt;p&gt;A successful apply means the API accepted the change. It takes a separate check to learn whether the new Pods are serving traffic. Put that check in the deployment workflow so a failed rollout produces a clear stop.&lt;/p&gt;
&lt;div class=&quot;snippet&quot;&gt;
    &lt;div class=&quot;snippet-bar&quot;&gt;&lt;span&gt;sh&lt;/span&gt;&lt;/div&gt;
    &lt;pre tabindex=&quot;0&quot;&gt;&lt;code&gt;kubectl -n staging rollout history deployment/api
kubectl -n staging rollout status deployment/api --timeout=3m
kubectl -n staging get pods -l app=api -o wide&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;h2 id=&quot;choose-the-smoke-test-before-deploying&quot;&gt;Choose the smoke test before deploying&lt;/h2&gt;
&lt;p&gt;For a catalog service, read one known item through the same hostname and load balancer that clients use. Check the response shape and a field that should exist. Capture the version and request ID where possible so you can tie failures to the new replica.&lt;/p&gt;
&lt;p&gt;When the rollout stalls, read events for image pulls, scheduling, and probe failures. If Kubernetes reports a progress deadline, the controller surfaces the problem for an operator or deployment tool to handle. Decide whether to fix forward or restore a known good revision.&lt;/p&gt;
&lt;h2 id=&quot;know-what-a-rollback-restores&quot;&gt;Know what a rollback restores&lt;/h2&gt;
&lt;div class=&quot;snippet&quot;&gt;
    &lt;div class=&quot;snippet-bar&quot;&gt;&lt;span&gt;sh&lt;/span&gt;&lt;/div&gt;
    &lt;pre tabindex=&quot;0&quot;&gt;&lt;code&gt;# Replace 12 with the tested revision from rollout history.
kubectl -n staging rollout undo deployment/api --to-revision=12
kubectl -n staging rollout status deployment/api --timeout=3m&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;p&gt;The rollback restores the Deployment’s Pod template. A database migration, changed external secret, or API contract can outlive it. During a schema change, make sure the old and new application versions can both run against the transitional schema before sending any production traffic to the new version.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Trace an AWS VPC route before changing firewalls</title><link>https://www.shenjianan97.com/posts/aws-vpc-route-debugging/</link>
      <guid>https://www.shenjianan97.com/posts/aws-vpc-route-debugging/</guid><pubDate>Fri, 20 Nov 2026 16:00:00 GMT</pubDate>
      <category>Cloud</category><description>&lt;p&gt;When an instance loses access to a destination, draw one concrete connection. Write down the source subnet and address, the destination address and port, and the expected route back. Repeat the drawing when the destination changes. A working connection to a neighbor says little about how an external connection will leave the subnet.&lt;/p&gt;
&lt;h2 id=&quot;find-the-table-in-use&quot;&gt;Find the table in use&lt;/h2&gt;
&lt;p&gt;Look for an explicit route table association for the source subnet. If there is none, use the VPC’s main table. Within the table, the most specific matching destination normally wins. A route for a narrow network can therefore take precedence over the default route.&lt;/p&gt;
&lt;h2 id=&quot;distinguish-route-targets&quot;&gt;Distinguish route targets&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;An internet gateway is one piece of an IPv4 public subnet setup. An instance also needs a public address or an appropriate frontend and rules that allow the connection.&lt;/li&gt;&lt;li&gt;A public NAT gateway can provide outbound IPv4 access for private subnets. Follow its own subnet route as well as the workload subnet route.&lt;/li&gt;&lt;li&gt;An S3 gateway endpoint affects the route tables associated with that endpoint. Check which table was selected and whether the endpoint policy allows the request.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Once the route makes sense, check security groups at the endpoints and network ACLs at the subnets. Security groups are stateful. Network ACLs are stateless, so the return path needs its own allowance. Distinguish TCP reachability from an HTTPS authorization failure before broadening access.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Practice one restore from S3 version history</title><link>https://www.shenjianan97.com/posts/s3-versioned-restore/</link>
      <guid>https://www.shenjianan97.com/posts/s3-versioned-restore/</guid><pubDate>Fri, 20 Nov 2026 16:00:00 GMT</pubDate>
      <category>Cloud</category><description>&lt;p&gt;Versioning is most useful when you know what recovery looks like. Start with a disposable object in a bucket that already has versioning enabled. Write two revisions, record the checksum of the first revision, and recover it to a scratch path.&lt;/p&gt;
&lt;div class=&quot;snippet&quot;&gt;
    &lt;div class=&quot;snippet-bar&quot;&gt;&lt;span&gt;sh&lt;/span&gt;&lt;/div&gt;
    &lt;pre tabindex=&quot;0&quot;&gt;&lt;code&gt;aws s3api list-object-versions \
  --bucket example-bucket --prefix reports/demo.csv \
  --query &amp;#39;Versions[].[Key,VersionId,LastModified,IsLatest]&amp;#39;

aws s3api get-object \
  --bucket example-bucket --key reports/demo.csv \
  --version-id &amp;quot;$VERSION_ID&amp;quot; /tmp/restored-demo.csv

sha256sum /tmp/restored-demo.csv&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;h2 id=&quot;make-the-verification-meaningful&quot;&gt;Make the verification meaningful&lt;/h2&gt;
&lt;p&gt;Check that the version belongs to the exact key. A prefix can match several nearby names. Compare the restored checksum with the recorded value, then open or parse the object. For an encrypted object, the recovery identity may need access to the encryption key as well as permission to read the specific S3 version.&lt;/p&gt;
&lt;p&gt;A simple delete in a versioned bucket normally creates a delete marker. An older object version can still be found by version ID until a retention or lifecycle policy removes it. Check how long noncurrent versions are retained and practice with an object old enough to represent your recovery needs.&lt;/p&gt;
&lt;p&gt;Record the time it took to select, recover, and verify the version. That time is far more useful during an incident than a note that says versioning is enabled.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Read the replacement lines in a Terraform plan</title><link>https://www.shenjianan97.com/posts/terraform-plan-review/</link>
      <guid>https://www.shenjianan97.com/posts/terraform-plan-review/</guid><pubDate>Fri, 20 Nov 2026 16:00:00 GMT</pubDate>
      <category>Cloud</category><description>&lt;p&gt;A plan summary can show one add and one destroy for a single resource replacement. Before approving it, locate the resource address, find the attribute driving the replacement, and determine what depends on the old instance.&lt;/p&gt;
&lt;div class=&quot;snippet&quot;&gt;
    &lt;div class=&quot;snippet-bar&quot;&gt;&lt;span&gt;sh&lt;/span&gt;&lt;/div&gt;
    &lt;pre tabindex=&quot;0&quot;&gt;&lt;code&gt;terraform plan -out=tfplan
terraform show -no-color tfplan&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;h2 id=&quot;review-in-order-of-impact&quot;&gt;Review in order of impact&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Check the account, region, workspace, and input values before interpreting the diff.&lt;/li&gt;&lt;li&gt;Read destroy and replacement actions first. Ask what changes if the old instance disappears before the new one is ready.&lt;/li&gt;&lt;li&gt;Review changes to routes, permissions, and retention settings even when the resources stay in place. A small diff can affect many callers.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;A saved plan lets you apply the selected changes rather than recomputing a different plan at approval time. If someone changes state or the environment materially between review and apply, refresh the plan and review again. Keep the saved artifact in restricted storage because it can contain sensitive values.&lt;/p&gt;
&lt;h2 id=&quot;treat-drift-as-information&quot;&gt;Treat drift as information&lt;/h2&gt;
&lt;p&gt;If a resource changed outside Terraform, determine whether the live setting is an emergency correction that should be adopted or an unintended change that should be reverted. Write down that decision in the same review. Otherwise the next apply can silently undo a fix whose purpose was never recorded.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Keep the expensive layers of a Docker build warm</title><link>https://www.shenjianan97.com/posts/docker-build-cache-order/</link>
      <guid>https://www.shenjianan97.com/posts/docker-build-cache-order/</guid><pubDate>Fri, 20 Nov 2026 16:00:00 GMT</pubDate>
      <category>Delivery</category><description>&lt;p&gt;When every edit triggers a dependency install, inspect the order of the Dockerfile. Copying the whole project before installing packages makes any source change invalidate the expensive layer. Copy the files used to resolve dependencies first.&lt;/p&gt;
&lt;div class=&quot;snippet&quot;&gt;
    &lt;div class=&quot;snippet-bar&quot;&gt;&lt;span&gt;dockerfile&lt;/span&gt;&lt;/div&gt;
    &lt;pre tabindex=&quot;0&quot;&gt;&lt;code&gt;FROM node:24-bookworm-slim AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;p&gt;This fragment assumes a project that builds into a separate output directory. Hand that output to a runtime stage suited to the application. A static site needs a file server. A server-side app may still need its production dependencies. Review the contents of the final image either way.&lt;/p&gt;
&lt;h2 id=&quot;check-which-changes-break-the-cache&quot;&gt;Check which changes break the cache&lt;/h2&gt;
&lt;p&gt;Build twice with plain progress output. Then edit a source file and build again. You should see the source and build steps rerun while the dependency step stays cached. Finally, change the lockfile and verify the install reruns.&lt;/p&gt;
&lt;p&gt;Use a .dockerignore to keep local dependency folders, build results, Git metadata where unnecessary, and local environment files out of the build context. For private dependency credentials, use BuildKit secret mounts. A secret copied into a layer may remain in the image history after a later step deletes it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cache dependencies. Keep release artifacts.</title><link>https://www.shenjianan97.com/posts/github-actions-cache-vs-artifact/</link>
      <guid>https://www.shenjianan97.com/posts/github-actions-cache-vs-artifact/</guid><pubDate>Fri, 20 Nov 2026 16:00:00 GMT</pubDate>
      <category>Delivery</category><description>&lt;p&gt;A cache is an optimization: a job should still pass on a cold runner. A build artifact is a product of a particular run: a package, a log bundle, or the site that will be deployed. The distinction becomes useful when approval happens after the build.&lt;/p&gt;
&lt;h2 id=&quot;make-the-input-reproducible&quot;&gt;Make the input reproducible&lt;/h2&gt;
&lt;p&gt;Install against a lockfile. Include the operating system, toolchain when relevant, and a lockfile hash in the dependency cache key. Keep a cold-run path to verify that a missed cache only costs time. Avoid caching credentials or files that contain them.&lt;/p&gt;
&lt;h2 id=&quot;deploy-the-tested-output&quot;&gt;Deploy the tested output&lt;/h2&gt;
&lt;p&gt;Upload the built directory or package from the build job. A later job can download that artifact from the same run and deploy it after approval. Rebuilding during deployment can pick up a different compiler, dependency source, or timestamp and makes it harder to prove what was tested.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Keep test reports separately so failed runs can still explain what happened.&lt;/li&gt;&lt;li&gt;Record the Git commit and an artifact digest when the deployment system supports it.&lt;/li&gt;&lt;li&gt;Choose retention based on how long a release might need to be audited or rolled back.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;A useful exercise is to delete a dependency cache in a test workflow. The build may take longer, but the artifact should still be produced. Then remove the expected artifact in a test run. The deployment should stop with a clear error.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Read the tail of a latency histogram</title><link>https://www.shenjianan97.com/posts/prometheus-histograms-and-tail-latency/</link>
      <guid>https://www.shenjianan97.com/posts/prometheus-histograms-and-tail-latency/</guid><pubDate>Fri, 20 Nov 2026 16:00:00 GMT</pubDate>
      <category>Observability</category><description>&lt;p&gt;An average can hold steady while a small share of requests gets dramatically slower. A latency histogram helps locate that tail. With a classic Prometheus histogram, each bucket is a counter for requests whose duration was at most the bucket boundary.&lt;/p&gt;
&lt;div class=&quot;snippet&quot;&gt;
    &lt;div class=&quot;snippet-bar&quot;&gt;&lt;span&gt;promql&lt;/span&gt;&lt;/div&gt;
    &lt;pre tabindex=&quot;0&quot;&gt;&lt;code&gt;histogram_quantile(
  0.95,
  sum by (le, route) (
    rate(http_request_duration_seconds_bucket[5m])
  )
)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;p&gt;Keep the le label when aggregating classic buckets. Summing the bucket rates across replicas lets Prometheus estimate the percentile of their combined observations. Averaging a p95 calculated for each replica gives each replica’s percentile a vote without accounting for how much traffic it handled.&lt;/p&gt;
&lt;h2 id=&quot;put-request-volume-beside-the-percentile&quot;&gt;Put request volume beside the percentile&lt;/h2&gt;
&lt;p&gt;During a quiet window, a few requests can move the estimated p95 sharply. Show the request count or rate next to the percentile. When a latency target has a fixed threshold, consider showing the fraction of requests in the bucket at that threshold too.&lt;/p&gt;
&lt;p&gt;Bucket boundaries matter. If most values land in one wide bucket near your target, the estimate can look more precise than the measurement. Place extra boundaries around the latencies you need to distinguish, and use a bounded set of route names so every user ID or raw URL does not become a new time series.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Follow a PostgreSQL lock wait to its blocker</title><link>https://www.shenjianan97.com/posts/postgres-lock-waits/</link>
      <guid>https://www.shenjianan97.com/posts/postgres-lock-waits/</guid><pubDate>Fri, 20 Nov 2026 16:00:00 GMT</pubDate>
      <category>Databases</category><description>&lt;p&gt;When normally cheap queries suddenly take seconds, check whether they are waiting for a lock. A query can be active from the database’s point of view while making no progress because another transaction still holds a resource.&lt;/p&gt;
&lt;div class=&quot;snippet&quot;&gt;
    &lt;div class=&quot;snippet-bar&quot;&gt;&lt;span&gt;sql&lt;/span&gt;&lt;/div&gt;
    &lt;pre tabindex=&quot;0&quot;&gt;&lt;code&gt;SELECT pid,
       application_name,
       wait_event,
       now() - query_start AS query_age,
       pg_blocking_pids(pid) AS blocked_by
FROM pg_stat_activity
WHERE wait_event_type = &amp;#39;Lock&amp;#39;
ORDER BY query_start;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;h2 id=&quot;look-up-the-blocking-session&quot;&gt;Look up the blocking session&lt;/h2&gt;
&lt;p&gt;Use the returned process IDs to inspect the blockers in pg_stat_activity. Check the application name, transaction age, and session state. A session that is idle in transaction can hold locks while its client is doing no database work. A migration can also wait behind an older transaction and leave other requests queued behind it.&lt;/p&gt;
&lt;p&gt;On a shared system, coordinate with the owner before canceling work. A forced rollback may be expensive or interrupt a job that cannot simply rerun. Check whether the application has a safe retry path and whether the blocking transaction is healthy enough to let it finish.&lt;/p&gt;
&lt;p&gt;After recovery, reproduce a small version of the wait in staging with two sessions. Look for a shorter transaction, an application that reliably commits or rolls back, or a migration workflow with an explicit lock timeout.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Check where a domain points after a DNS change</title><link>https://www.shenjianan97.com/posts/dns-authoritative-vs-cache/</link>
      <guid>https://www.shenjianan97.com/posts/dns-authoritative-vs-cache/</guid><pubDate>Fri, 20 Nov 2026 16:00:00 GMT</pubDate>
      <category>Networking</category><description>&lt;p&gt;After a server move, one phone may reach the new site while another still sees a parking page. The two clients may be using different recursive resolvers. Each resolver can keep an older answer until its cached TTL expires.&lt;/p&gt;
&lt;div class=&quot;snippet&quot;&gt;
    &lt;div class=&quot;snippet-bar&quot;&gt;&lt;span&gt;sh&lt;/span&gt;&lt;/div&gt;
    &lt;pre tabindex=&quot;0&quot;&gt;&lt;code&gt;dig +short example.com NS
dig +noall +answer @ns1.example.net www.example.com A
dig +noall +answer www.example.com A
dig +noall +answer www.example.com AAAA&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;p&gt;Replace the example nameserver with one from the first command. The direct query tells you what that authoritative server serves. The query without an explicit server reflects the resolver configured on your machine. Compare the answer and its remaining TTL. If the authoritative servers disagree, check the DNS provider before waiting on caches.&lt;/p&gt;
&lt;h2 id=&quot;trace-the-full-hostname&quot;&gt;Trace the full hostname&lt;/h2&gt;
&lt;p&gt;The apex and www are separate names. IPv4 and IPv6 can also lead a browser to different endpoints. Check aliases and remove an obsolete AAAA record only after confirming which host should handle IPv6. Lowering TTL ahead of a migration can shorten the cutover window once the previous TTL has passed.&lt;/p&gt;
&lt;p&gt;Finally open the real URL and check what certificate and page come back. An address record can point to the right IP while the web server still selects the wrong virtual host.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Start with the cable when Wi-Fi feels slow</title><link>https://www.shenjianan97.com/posts/home-network-wired-baseline/</link>
      <guid>https://www.shenjianan97.com/posts/home-network-wired-baseline/</guid><pubDate>Fri, 20 Nov 2026 16:00:00 GMT</pubDate>
      <category>Networking</category><description>&lt;p&gt;A speed test against a remote server mixes the wireless link, your router, your ISP, and the remote path. A transfer to a known wired device on your network can isolate several of those variables. Put the test server on Ethernet and keep it fixed while comparing clients.&lt;/p&gt;
&lt;div class=&quot;snippet&quot;&gt;
    &lt;div class=&quot;snippet-bar&quot;&gt;&lt;span&gt;sh&lt;/span&gt;&lt;/div&gt;
    &lt;pre tabindex=&quot;0&quot;&gt;&lt;code&gt;# On a trusted, wired machine on the LAN:
iperf3 -s

# On the client, replacing this address with the server&amp;#39;s LAN IP:
iperf3 -c 192.168.1.20 -t 15
iperf3 -c 192.168.1.20 -t 15 -R&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;h2 id=&quot;compare-the-same-path&quot;&gt;Compare the same path&lt;/h2&gt;
&lt;p&gt;Test a wired client first, then a wireless client from the spot where you noticed the slowdown. The reverse test sends traffic from the server to the client. Measuring both directions can reveal unequal performance caused by signal, interference, or device radios.&lt;/p&gt;
&lt;p&gt;If wired throughput is also poor, check the link speed on both ends. A port negotiating at 100 Mbps often points toward a cable, connector, or link partner worth checking. Change one thing and repeat the same test.&lt;/p&gt;
&lt;p&gt;If the LAN test is fast but a remote speed test is slow, repeat the remote test from the wired client. Look upstream when both clients show the same limit. Stop the local iperf server after the comparison.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Make a rollback boring</title><link>https://www.shenjianan97.com/posts/rollback-checklist/</link>
      <guid>https://www.shenjianan97.com/posts/rollback-checklist/</guid><pubDate>Fri, 20 Nov 2026 16:00:00 GMT</pubDate>
      <category>Reliability</category><description>&lt;p&gt;A rollback plan is easiest to write while the old service is still healthy. Capture the version and configuration that are actually running. A file with “backup” in its name is useful only if you know which service can read it and how to load it.&lt;/p&gt;
&lt;h2 id=&quot;write-three-lines-before-changing-anything&quot;&gt;Write three lines before changing anything&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;What will change: list the file, image, or DNS record and the new value.&lt;/li&gt;&lt;li&gt;How to verify it: choose a real request with a success condition, such as a page returning the expected title or a known API record loading through the public address.&lt;/li&gt;&lt;li&gt;When to revert: pick an observed failure and a time window, such as a repeated error during startup or a critical read that still fails after readiness goes green.&lt;/li&gt;&lt;/ul&gt;
&lt;h2 id=&quot;keep-the-old-version-reachable&quot;&gt;Keep the old version reachable&lt;/h2&gt;
&lt;p&gt;Retain the old artifact and config until the new version has worked through a normal traffic cycle. For file-based deploys, stage new files separately and check their ownership and readability. Switching a release directory is easier to reverse than copying individual files over the running release.&lt;/p&gt;
&lt;p&gt;A rollback may have side effects of its own. Before shipping a database migration, test how both versions behave against the new schema. Before a DNS change, account for old and new answers coexisting while caches expire. Include those limits in the release note so the person on call can act on them.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
