I’ve recently automated a large portion of my Rails performance audits. In this tutorial, I’ll describe how to configure an AI-powered PG performance debugging. We will cover using LLMs with custom MCP (model context protocol) n8n integration. We will also discuss the legal and security implications of connecting AI to the production database. How to optimize PostgreSQL performance with AI? I’m not sure if the current blogosphere needs yet another introduction to MCP. Instead, here’...| Rails, PostgreSQL Performance and Scalability Blog
Any imbalance that makes it past the Mempool is a potential source of MEV profit. In this post, I describe the process of discovering, analyzing, and executing a long-tail MEV strategy on the Ethereum Mainnet. We will discuss Mempool monitoring, oracle backrunning, recurring Defi exploits, and more. I’ll also showcase how to use mevlog.rs CLI and web interface for finding long-tail profit opportunities. Disclaimer: The information provided in this blog post is for educational purposes only ...| Rails, PostgreSQL Performance and Scalability Blog
It’s extremely challenging for MEV newcomers to profit from popular strategies. That’s why, I’ve refined my searching approach to focus on niche and less obvious opportunities. In this blog post, I’ll showcase a Rust CLI tool that helps me query blockchain data to discover long-tail MEV. I will also describe Revm vs RPC EVM tracing techniques and their performance characteristics. Disclaimer: The information provided in this blog post is for educational purposes only and should not be...| Rails, PostgreSQL Performance and Scalability Blog
My side project Abot for Slack, has been around for ~7 years, i.e., since Rails 5.1. It’s now yielding passive income while running on an almost complete autopilot. But I’m still keeping its dependencies up-to-date. The recent migration to Rails 8 was arguably the most impactful in the app’s lifetime. In this blog post, I’ll describe features introduced in the newest version of the framework and how they affected my project. Kamal vs Dokku TLDR initial impressions migrating Abot from ...| Rails, PostgreSQL Performance and Scalability Blog
0x0000000 accounts are so last season. Now it’s all about vanity tx prefixes. In this blog post, we will learn how to impress your Etherscan followers and fry a few CPU cores along the way. Vanity txs It all started from this X thread. Apparently, there’s a bigbrainchad.eth bot, that extracts the MEV in style. All his txs hashes start with the 0xbeef prefix: I immediately got jealous and also wanted to send a few cool-looking txs. Hence the birth of alloy-deadbeef lib, and soon my vanity ...| Rails, PostgreSQL Performance and Scalability Blog
Visits counter was a critical feature of every website just 20 years ago. In this tutorial, we will implement it with Rust Cloudflare Workers by adding persistence and dynamic behaviors to an otherwise static page. We will also discuss other practical use cases of CF workers edge proxy. Static blog with CF edge caching Visits: [VISITS_COUNT] This blog is a static JekyllRB website hosted on an EC2 behind an NGINX proxy. Additionally, it’s using a Cache everything Cloudflare cache rule with t...| Rails, PostgreSQL Performance and Scalability Blog
MEV bots are money-printing machines. At least in theory. For the last ~year, I’ve been working on the MEV crypto bot for Ethereum EVM-compatible chains. In this blog post, I’ll describe the ins and outs of trying to get into the MEV game with a limited web3 skillset and relatively small capital. Disclaimer: The information provided in this blog post is for educational purposes only and should not be treated as financial advice. MEV is extremely risky, and you’re likely to lose all the ...| Rails, PostgreSQL Performance and Scalability Blog
Performance issues in the PostgreSQL layer usually start to manifest only when your app reaches a certain scale. In this blog post, I’ll discuss easy-to-miss database config tweaks and common problems that I’ve encountered in multiple Rails projects. Tuning random_page_cost in PostgreSQL random_page_cost is infamously misconfigured in the default PostgreSQL settings. This value represents how expensive it is to fetch a row using a database index. A related seq_page_cost represents the cos...| Rails, PostgreSQL Performance and Scalability Blog
Minimizing gas usage directly impacts the profitability of your MEV bot. In this blog post, we will start with a straightforward but nonoptimal approach for swapping two UniswapV2 pairs and gradually improve it. We will start with Solidity-level fixes and later descend into the lower layers of the Ethereum EVM with Yul and Huff assembly languages.| Rails, PostgreSQL Performance and Scalability Blog
Full Stack web development consultant with over 10 years of experience. Founder of Abot for Slack. Specializing in Ruby on Rails, PostgreSQL and website performance.| Rails, PostgreSQL Performance and Scalability Blog
Puts debugging is the best. In this tutorial, I’ll walk you through my workflow for debugging Rails codebases using a custom toolkit inspired by Rust. We will also discuss how to smuggle your debug tools, through even the most rigorous code review process.| Rails, PostgreSQL Performance Audit and Tuning Consultant for Hire
PostgreSQL database queries are a common performance bottleneck for web apps. Before you resort to more complex optimization techniques like caching or read replicas, you should double-check if your database engine does not need tuning and queries are not underperforming. In this blog post, I present a step by step guide on using PG Extras library to spot and resolve common PostgreSQL database performance issues.| Rails, PostgreSQL Performance and Scalability Blog
The guide describes all the steps required to safely migrate your Heroku PostgreSQL database to AWS RDS. Zero prior AWS experience is required to complete the guide. All the steps are described in a detailed way together with code snippets and AWS console screenshots. The guide is written in a programming language-agnostic way, so it applies to all the backend technologies hosted on Heroku.| Rails, PostgreSQL Performance Audit and Tuning Consultant for Hire
Interpreting the output of SQL EXPLAIN ANALYZE might seem like dark magic at first. I'm starting a series of blog posts where I'll be well... explaining it based on common use cases from web applications. Read on if you've ever wanted to start using EXPLAIN ANALYZE for debugging slow PostgreSQL queries but did not manage to wrap your head around it. In the first part, we'll discuss how the PostgreSQL query planner decides whether to use an index.| Rails, PostgreSQL Performance Audit and Tuning Consultant for Hire
EVM simulation engine is a core component of any competitive MEV strategy. In this tutorial, I'll describe how to use Anvil and its lower-level counterpart REVM to detect UniswapV3 MEV arbitrage opportunities. We will implement a working proof of concept using alloy-rs (a successor to ethers-rs). I'll also discuss techniques for improving the performance and scalability of REVM-based simulations.| Rails, PostgreSQL Performance Audit and Tuning Consultant for Hire
PostgreSQL query planner is full of surprises, so a common-sense approach to writing performant queries is sometimes misleading. In this blog post, I'll describe examples of optimizing seemingly obvious queries with the help of EXPLAIN ANALYZE and Postgres metadata analysis.| Rails, PostgreSQL Performance Audit and Tuning Consultant for Hire