<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Viktar Patotski’s Blog</title><description>Senior independent consulting for vertical SaaS: AWS cost optimization, performance engineering, scale readiness, AI enablement, security &amp; compliance. 20+ years.</description><link>https://patotski.com/</link><item><title>Build an MCP Server in Java with Spring AI: Give Your Product an AI Interface</title><link>https://patotski.com/blog/mcp-server-java-spring-ai/</link><guid isPermaLink="true">https://patotski.com/blog/mcp-server-java-spring-ai/</guid><description>On a well-built Spring Boot app, exposing your product to AI agents is almost trivial: annotate a service method, add one starter. The wiring is the easy part. Choosing what to expose and securing it is the real work. Here is the honest version, on Spring AI 2.0.</description><pubDate>Thu, 16 Jul 2026 00:00:00 GMT</pubDate></item><item><title>Database Encryption at Rest: What Protects You vs What Checks a Box</title><link>https://patotski.com/blog/database-encryption-at-rest/</link><guid isPermaLink="true">https://patotski.com/blog/database-encryption-at-rest/</guid><description>Turning on RDS encryption satisfies the compliance question and stops almost none of the attacks that actually leak data. Here is what each layer of encryption at rest really defends against, on Postgres and AWS, and how to build the one that protects the sensitive field.</description><pubDate>Mon, 13 Jul 2026 00:00:00 GMT</pubDate></item><item><title>RAG Explained: What It Is and When You Actually Need It</title><link>https://patotski.com/blog/rag-explained/</link><guid isPermaLink="true">https://patotski.com/blog/rag-explained/</guid><description>RAG means handing your AI the right page from your own documents before it answers. It is powerful when your knowledge base is large, changing, or per-customer. It is also something a lot of teams build too early. Here is the honest decision.</description><pubDate>Mon, 13 Jul 2026 00:00:00 GMT</pubDate></item><item><title>Secrets Management on AWS: Parameter Store vs Secrets Manager vs Vault</title><link>https://patotski.com/blog/secrets-management-aws/</link><guid isPermaLink="true">https://patotski.com/blog/secrets-management-aws/</guid><description>Environment variables are where secrets go to leak. Here is how to get them out, what each store actually buys you (and costs), and how to wire it into a Spring app without calling an API on every request.</description><pubDate>Mon, 13 Jul 2026 00:00:00 GMT</pubDate></item><item><title>Spring AI vs LangChain4j: Which Java AI Framework to Pick in 2026</title><link>https://patotski.com/blog/spring-ai-vs-langchain4j/</link><guid isPermaLink="true">https://patotski.com/blog/spring-ai-vs-langchain4j/</guid><description>You run a Java product and want to add an AI feature. There are two real framework choices. Here is the honest comparison across providers, RAG, tools, Spring fit, and the one thing that decides it for most teams.</description><pubDate>Sun, 12 Jul 2026 00:00:00 GMT</pubDate></item><item><title>Argon2 vs bcrypt vs scrypt: Which Password Hash to Use, and How to Tune It</title><link>https://patotski.com/blog/argon2-vs-bcrypt-vs-scrypt/</link><guid isPermaLink="true">https://patotski.com/blog/argon2-vs-bcrypt-vs-scrypt/</guid><description>The strength question first, then real numbers. Which password hashing algorithm actually protects you, what the current recommendations are, and how to tune each one to a verification time your login path can absorb.</description><pubDate>Sat, 11 Jul 2026 00:00:00 GMT</pubDate></item><item><title>Virtual Threads vs Platform Threads: A Spring Boot Benchmark on AWS</title><link>https://patotski.com/blog/spring-boot-virtual-threads-benchmark/</link><guid isPermaLink="true">https://patotski.com/blog/spring-boot-virtual-threads-benchmark/</guid><description>Do Java virtual threads make a Spring Boot app faster? I load-tested the same app both ways on real AWS hardware. The honest answer: below saturation they do nothing, on CPU-bound work they do nothing, and where they win on blocking I/O, a properly tuned platform pool matches the throughput. The real case for virtual threads is not raw speed, it is having no pool to tune and a cheaper thread.</description><pubDate>Thu, 09 Jul 2026 10:00:00 GMT</pubDate></item><item><title>Graviton vs Intel vs AMD: I Measured the Price-Performance on a Real Spring App</title><link>https://patotski.com/blog/aws-graviton-price-performance/</link><guid isPermaLink="true">https://patotski.com/blog/aws-graviton-price-performance/</guid><description>AWS says Graviton gives up to 40 percent better price-performance. I put the same Spring app on same-rank Intel, AMD, and Graviton instances and measured it. It is true, I got 43 to 60 percent, but the reason is not that Graviton is faster. It is cheaper, and same vCPU does not mean same cores.</description><pubDate>Thu, 09 Jul 2026 09:00:00 GMT</pubDate></item><item><title>Auditing Your Cloud and Identity Setup with AI</title><link>https://patotski.com/blog/ai-cloud-security-audit/</link><guid isPermaLink="true">https://patotski.com/blog/ai-cloud-security-audit/</guid><description>Most breaches are not a code bug. They are a public bucket or an over-broad role nobody reviewed. Here is how to use AI for an expert first pass over your cloud, identity, and infrastructure config, and the tools and guardrails that keep it honest.</description><pubDate>Tue, 07 Jul 2026 00:00:00 GMT</pubDate></item><item><title>What an LLM Feature Really Costs</title><link>https://patotski.com/blog/llm-feature-cost/</link><guid isPermaLink="true">https://patotski.com/blog/llm-feature-cost/</guid><description>The API price page says a few dollars per million tokens and looks cheap. That is not what your AI feature will cost. Here is the real formula, a worked example, the levers that cut the bill, and when self-hosting actually pays.</description><pubDate>Tue, 07 Jul 2026 00:00:00 GMT</pubDate></item><item><title>What Is Multi-Tenancy? A Plain-English Guide for SaaS Teams</title><link>https://patotski.com/blog/what-is-multi-tenancy/</link><guid isPermaLink="true">https://patotski.com/blog/what-is-multi-tenancy/</guid><description>Multi-tenancy means one running application serves many customers while keeping their data apart. Here is what it means, the apartment-building analogy that makes it click, the three models, and how tenants stay separated, with links to go deep on each.</description><pubDate>Tue, 07 Jul 2026 00:00:00 GMT</pubDate></item><item><title>Using AI for Secure Code Review: A Workflow That Holds Up</title><link>https://patotski.com/blog/ai-secure-code-review/</link><guid isPermaLink="true">https://patotski.com/blog/ai-secure-code-review/</guid><description>AI assistants can now scan your codebase for vulnerabilities and propose patches. Here is how to wire that into a real pipeline, why you still keep a deterministic scanner next to it, and the four places it will lie to you if you let it.</description><pubDate>Mon, 06 Jul 2026 00:00:00 GMT</pubDate></item><item><title>AI Wrote Your Code. It Wrote the Vulnerabilities Too.</title><link>https://patotski.com/blog/ai-generated-code-security/</link><guid isPermaLink="true">https://patotski.com/blog/ai-generated-code-security/</guid><description>Assistants like Copilot, Cursor, and Claude Code ship features fast and ship security holes at the same speed. Here are the flaws they reliably produce, with real before-and-after code, and how to use AI to catch them before an attacker does.</description><pubDate>Mon, 06 Jul 2026 00:00:00 GMT</pubDate></item><item><title>Tenant Data Isolation: It Is a Stack, Not a Switch</title><link>https://patotski.com/blog/tenant-data-isolation/</link><guid isPermaLink="true">https://patotski.com/blog/tenant-data-isolation/</guid><description>Row-Level Security is one layer, not the whole answer. Real tenant isolation is defense in depth across the data, the API, and the keys, so that no single mistake exposes another customer. Here are the layers and where each one earns its place.</description><pubDate>Mon, 06 Jul 2026 00:00:00 GMT</pubDate></item><item><title>Postgres Row-Level Security for Multi-Tenancy: The Pattern and the Footguns</title><link>https://patotski.com/blog/postgres-row-level-security-multi-tenant/</link><guid isPermaLink="true">https://patotski.com/blog/postgres-row-level-security-multi-tenant/</guid><description>Row-Level Security moves tenant isolation out of every developer&apos;s memory and into the database itself. Here is the exact Postgres pattern for a pooled multi-tenant app, plus the four footguns that leak data in production if you miss them.</description><pubDate>Sun, 05 Jul 2026 00:00:00 GMT</pubDate></item><item><title>How to Reduce Your AWS Costs: The Full Playbook</title><link>https://patotski.com/blog/reduce-aws-costs/</link><guid isPermaLink="true">https://patotski.com/blog/reduce-aws-costs/</guid><description>Most AWS bills carry 20 to 40 percent waste, and cutting it does not take a FinOps team. This is the whole method in four steps: see where the money goes, kill the waste, pay less for what remains, and keep the bill down for good. Each step links to its own deep dive.</description><pubDate>Sun, 05 Jul 2026 00:00:00 GMT</pubDate></item><item><title>Single-Tenant vs Multi-Tenant: The Decision Is Usually Both</title><link>https://patotski.com/blog/single-tenant-vs-multi-tenant/</link><guid isPermaLink="true">https://patotski.com/blog/single-tenant-vs-multi-tenant/</guid><description>The question is not which one wins, it is where you draw the isolation boundary. Here is how single and multi-tenant differ on cost, isolation, compliance, and ops, and why most SaaS that scales ends up running both at once.</description><pubDate>Sat, 04 Jul 2026 00:00:00 GMT</pubDate></item><item><title>Multi-Tenant Architecture for Vertical SaaS: Pick the Model on Purpose</title><link>https://patotski.com/blog/multi-tenant-architecture/</link><guid isPermaLink="true">https://patotski.com/blog/multi-tenant-architecture/</guid><description>Silo, pool, or bridge is one of the few architecture choices you cannot cheaply reverse. Here are the three models in plain terms, how they map to a real database, and a decision framework so you pick the one your customers and your margins actually need.</description><pubDate>Fri, 03 Jul 2026 00:00:00 GMT</pubDate></item><item><title>AWS Cost Explorer: How to Actually Read Your Bill</title><link>https://patotski.com/blog/aws-cost-explorer-read-your-bill/</link><guid isPermaLink="true">https://patotski.com/blog/aws-cost-explorer-read-your-bill/</guid><description>Your AWS bill is not a mystery, you just have not grouped it right. Cost Explorer is free and shows you where every dollar goes in about fifteen minutes. Here is the exact drill-down, which cost view to trust, and the one free alarm to set before you close the tab.</description><pubDate>Thu, 02 Jul 2026 00:00:00 GMT</pubDate></item><item><title>AWS Graviton: The 20% Cost Cut Most Teams Leave on the Table</title><link>https://patotski.com/blog/aws-graviton-migration/</link><guid isPermaLink="true">https://patotski.com/blog/aws-graviton-migration/</guid><description>Graviton instances cost up to 20% less than the x86 equivalent for the same work. On managed services it is a setting you flip. On your own compute it is a real migration with real gotchas. Here is which workloads move for free, which take effort, and which cannot move at all.</description><pubDate>Wed, 01 Jul 2026 00:00:00 GMT</pubDate></item><item><title>Amazon Aurora Cost: Where It Saves You and Where It Quietly Burns You</title><link>https://patotski.com/blog/amazon-aurora-cost/</link><guid isPermaLink="true">https://patotski.com/blog/amazon-aurora-cost/</guid><description>Aurora can be cheaper than RDS or twice the price, and the deciding line item is the one nobody watches: I/O. Here is how the bill is built, when I/O-Optimized and Serverless v2 actually save money, and the traps that turn a managed database into your biggest surprise.</description><pubDate>Tue, 30 Jun 2026 00:00:00 GMT</pubDate></item><item><title>AWS Savings Plans vs Reserved Instances: Which One Actually Cuts Your Bill</title><link>https://patotski.com/blog/aws-savings-plans-vs-reserved-instances/</link><guid isPermaLink="true">https://patotski.com/blog/aws-savings-plans-vs-reserved-instances/</guid><description>Both trade a commitment for a discount, but they are not interchangeable. Savings Plans buy flexibility, Reserved Instances buy the deepest rate, and the data tier plays by its own rules. Here is how to pick without locking up capital you will regret.</description><pubDate>Mon, 29 Jun 2026 00:00:00 GMT</pubDate></item><item><title>AWS Data Transfer Costs: Where the Money Leaks and How to Cut It</title><link>https://patotski.com/blog/aws-data-transfer-costs/</link><guid isPermaLink="true">https://patotski.com/blog/aws-data-transfer-costs/</guid><description>AWS charges to move bytes based on where they go. The expensive surprises are not the internet egress everyone expects, they are the cross-AZ chatter you cannot see. Here is the full rate ladder and the cheapest ways to cut the bill.</description><pubDate>Sun, 28 Jun 2026 00:00:00 GMT</pubDate></item><item><title>Database Optimization: Find the Bottleneck, Fix the Cheapest Thing First</title><link>https://patotski.com/blog/database-optimization/</link><guid isPermaLink="true">https://patotski.com/blog/database-optimization/</guid><description>Most database optimization guides hand you a list of ten techniques and skip the one question that matters: which problem do you actually have? Here is the diagnosis-first version. Find the real bottleneck, then apply the cheapest fix that clears it.</description><pubDate>Sun, 28 Jun 2026 00:00:00 GMT</pubDate></item><item><title>AWS NAT Gateway Pricing: The Hidden Cost Trap and How to Cut It</title><link>https://patotski.com/blog/nat-gateway-cost-trap/</link><guid isPermaLink="true">https://patotski.com/blog/nat-gateway-cost-trap/</guid><description>A NAT gateway charges you twice: an hourly fee per gateway and a per-GB processing fee on every byte through it, often on top of normal data transfer. Here is where the money leaks and the cheapest ways to stop it.</description><pubDate>Sun, 28 Jun 2026 00:00:00 GMT</pubDate></item><item><title>Redis Caching vs a Local In-Memory Cache: When You Actually Need the Network Hop</title><link>https://patotski.com/blog/redis-caching-vs-local-cache/</link><guid isPermaLink="true">https://patotski.com/blog/redis-caching-vs-local-cache/</guid><description>A cache is the reflex after you fix the slow query. The real decision is where it lives. A local in-memory cache is faster and simpler than Redis until you run more than one instance, and then it quietly serves stale data. Here is how to pick.</description><pubDate>Wed, 24 Jun 2026 00:00:00 GMT</pubDate></item><item><title>The Database Scaling Ladder: Every Cheaper Fix Before You Shard</title><link>https://patotski.com/blog/database-scaling-ladder/</link><guid isPermaLink="true">https://patotski.com/blog/database-scaling-ladder/</guid><description>Most teams reach for sharding years before they need it. There is a ladder of cheaper, lower-risk fixes that comes first, and the right rung depends on which bottleneck you actually have: read load, write load, or data size. Here is the ladder, from cheapest to last resort.</description><pubDate>Thu, 18 Jun 2026 00:00:00 GMT</pubDate></item><item><title>Postgres vs MySQL in 2026: Which to Pick for a SaaS (and When to Switch)</title><link>https://patotski.com/blog/postgres-vs-mysql/</link><guid isPermaLink="true">https://patotski.com/blog/postgres-vs-mysql/</guid><description>Both are excellent databases and for most SaaS workloads either one is fine. The honest answer: pick Postgres for greenfield, keep what you run well, and switch only for a reason you can name. Here are the few differences that actually decide it.</description><pubDate>Wed, 17 Jun 2026 00:00:00 GMT</pubDate></item><item><title>Database Indexes That Actually Help (and the Ones Quietly Hurting You)</title><link>https://patotski.com/blog/database-indexing-that-actually-helps/</link><guid isPermaLink="true">https://patotski.com/blog/database-indexing-that-actually-helps/</guid><description>Most slow-query problems are not a missing index, they are the wrong index, or ten indexes nobody needs. Start from the query plan, build the index the query actually wants, and drop the ones taxing every write.</description><pubDate>Mon, 15 Jun 2026 00:00:00 GMT</pubDate></item><item><title>Model Access Just Became a Supply-Chain Risk</title><link>https://patotski.com/blog/model-access-supply-chain-risk/</link><guid isPermaLink="true">https://patotski.com/blog/model-access-supply-chain-risk/</guid><description>A government directive can now switch off your AI provider overnight - and pricing, deprecation, and policy could always do it. If a core feature depends on one model API you don&apos;t control, that&apos;s a single point of failure. Here&apos;s how to treat model access like any other supply-chain risk.</description><pubDate>Mon, 15 Jun 2026 00:00:00 GMT</pubDate></item><item><title>How to Reduce AWS RDS Costs Without Hurting Performance</title><link>https://patotski.com/blog/reduce-aws-rds-costs/</link><guid isPermaLink="true">https://patotski.com/blog/reduce-aws-rds-costs/</guid><description>RDS is often the second or third biggest line on an AWS bill, sometimes the first, and most of it is avoidable. The levers that move it: fix the queries before you upsize, match the instance to your load shape, and stop provisioning storage for data that has not arrived yet.</description><pubDate>Sun, 14 Jun 2026 00:00:00 GMT</pubDate></item><item><title>The Business Case for Software Performance: Six Ways Speed Makes You Money</title><link>https://patotski.com/blog/business-case-for-software-performance/</link><guid isPermaLink="true">https://patotski.com/blog/business-case-for-software-performance/</guid><description>One product I worked on went from 8-second page loads to 500ms and conversion doubled. Performance is a P&amp;L line. Here&apos;s the money math and what it means for SaaS.</description><pubDate>Thu, 11 Jun 2026 00:00:00 GMT</pubDate></item><item><title>Spring Boot on the JVM vs GraalVM Native: What Actually Wins on AWS</title><link>https://patotski.com/blog/spring-boot-jvm-vs-graalvm-native-benchmark/</link><guid isPermaLink="true">https://patotski.com/blog/spring-boot-jvm-vs-graalvm-native-benchmark/</guid><description>A head-to-head benchmark of the same Spring Boot app built for the JVM and as a GraalVM native binary - on real AWS hardware with a real database, run multiple times. Native wins startup, memory, and predictability; the warm JVM wins the median, peak throughput, and often the tail too - but the JVM swings run-to-run while native stays flat.</description><pubDate>Wed, 27 May 2026 00:00:00 GMT</pubDate></item><item><title>javax to jakarta: Migrate Spring Boot 2 to 3 the Safe Way</title><link>https://patotski.com/blog/spring-boot-3-javax-to-jakarta/</link><guid isPermaLink="true">https://patotski.com/blog/spring-boot-3-javax-to-jakarta/</guid><description>The javax to jakarta package rename is the hard part of the Spring Boot 3 upgrade. Why the one-line sed trick quietly breaks javax.sql and javax.crypto, which packages actually move, and how OpenRewrite does the whole migration for you. Tested on real apps.</description><pubDate>Sat, 26 Nov 2022 00:00:00 GMT</pubDate></item><item><title>Liquibase &apos;Could Not Acquire Change Log Lock&apos; - Permanent Fix With Session Locks</title><link>https://patotski.com/blog/liquibase-database-lock-permanent-solution/</link><guid isPermaLink="true">https://patotski.com/blog/liquibase-database-lock-permanent-solution/</guid><description>Stop the recurring &quot;could not acquire change log lock&quot; error in Liquibase. Replace databasechangeloglock with Postgres session locks - auto-releases on connection drop, no manual unlock.</description><pubDate>Wed, 15 Jun 2022 00:00:00 GMT</pubDate></item><item><title>How To: Find top used shell commands (Linux, macOS)</title><link>https://patotski.com/blog/find-top-used-shell-commands/</link><guid isPermaLink="true">https://patotski.com/blog/find-top-used-shell-commands/</guid><description>How to find top used shell commands in Linux of macOS terminal.</description><pubDate>Sat, 27 Feb 2021 00:00:00 GMT</pubDate></item><item><title>Spring: Autowire All Beans of an Interface into a List, Set, or Map</title><link>https://patotski.com/blog/autowiring-collection-of-beans-in-spring/</link><guid isPermaLink="true">https://patotski.com/blog/autowiring-collection-of-beans-in-spring/</guid><description>How to inject every Spring bean that implements an interface into one field: a List or array (ordered with @Order), a Set, or a Map&lt;String, T&gt; keyed by bean name. Working, copy-paste code for each.</description><pubDate>Tue, 23 Feb 2021 00:00:00 GMT</pubDate></item><item><title>Why should you write unit tests</title><link>https://patotski.com/blog/reasons-to-write-unit-tests/</link><guid isPermaLink="true">https://patotski.com/blog/reasons-to-write-unit-tests/</guid><description>Find reasoning and motivation to write unit tests for your application.</description><pubDate>Sat, 13 Feb 2021 00:00:00 GMT</pubDate></item><item><title>How To: Create a directory tree with a single command (Linux, macOS)</title><link>https://patotski.com/blog/create-directory-tree-in-cli/</link><guid isPermaLink="true">https://patotski.com/blog/create-directory-tree-in-cli/</guid><description>Create tree folder structure with a single command</description><pubDate>Wed, 03 Feb 2021 00:00:00 GMT</pubDate></item><item><title>Lombok @RequiredArgsConstructor: Spring Boot Constructor Injection</title><link>https://patotski.com/blog/spring-boot-components-with-lombok/</link><guid isPermaLink="true">https://patotski.com/blog/spring-boot-components-with-lombok/</guid><description>Constructor injection in Spring Boot with Lombok @RequiredArgsConstructor: drop @Autowired, keep fields final, no boilerplate. Setup with Maven and Gradle.</description><pubDate>Sun, 31 Jan 2021 00:00:00 GMT</pubDate></item></channel></rss>