サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
今年の「#文学」
pawelurbanek.com
Caching is an effective way to speed up the performance of Rails applications. However, the costs of an in-memory cache database could become significant for larger-scale projects. In this blog post, I’ll describe optimizing the Rails caching mechanism using the Brotli compression algorithm instead of the default Gzip. I’ll also discuss a more advanced technique of using in-memory cache for extrem
The In-depth Guide to ActiveRecord load_async in Rails 7 Updated Mar 1, 2022 17 minute read Rails 7 introduces ActiveRecord load_async method that runs SQL queries asynchronously in the background thread. This seemingly simple change of just adding a single new method that takes no arguments has profound implications for database layer interactions. In this tutorial, we’ll deep dive into the intri
My Recipe for Optimizing Performance of Rails Applications Updated Mar 16, 2023 5 minute read Rails performance audits and tuning have been my main occupation and source of income for over three years now. In this blog post, I’ll share a few secrets of my trade. Read on if you want to learn how I approach optimizing an unknown codebase, what tools I use, and which fixes are usually most impactful.
4 Non-standard Ways to Fix N+1 SQL Queries in Rails Updated Apr 6, 2021 6 minute read I’m not sure if the world needed another post about N+1 queries in Ruby on Rails. To make up for the cliche topic, I’ll describe less common solutions to this problem. Read on if you want to learn how to reduce the number of cascading N+1 SQL queries without using includes or additional table join operations. N+1
Brotli and Gzip Compression for Assets and JSON API in Rails Updated May 26, 2020 8 minute read HTTP content compression has a significant impact on the client-side performance of a web app. In this blog post, I’ll describe different methods for compressing dynamic and static content in Ruby on Rails apps using Gzip and Brotli algorithms. We’ll start by describing what exactly is a content compres
Ruby MRI does not support parallel CPU bound operations due to the dependency on non-thread safe C extensions. Input/Output operations like HTTP requests, are still a perfectly valid use case for spinning up multiple threads. Read on to learn what tools are available for requests concurrency in Ruby with all their cons and pros. Global Interpreter Lock and blocking I/O Let’s start by describing wh
UUID Primary Key in Rails 6 with PostgreSQL and Active Record Updated Mar 6, 2021 8 minute read UUID also known as GUID is an alternative primary key type for SQL databases. It offers some non-obvious advantages compared to standard integer-based keys. Rails 6 release fresh out of beta introduces a new feature in ActiveRecord that makes working with UUID primary keys more straightforward. In this
Storing sensitive data in plaintext can seriously harm your internet business if an attacker gets hold of the database. Encrypting data is also a GDPR friendly best practice. In this tutorial I will describe a simple way to securely encrypt, store, and decrypt data using built in Ruby on Rails helpers instead of external dependencies. Avoid heavy Gem dependencies attr_encrypted gem is a popular to
Rails ActiveRecord PostgreSQL Foreign Keys and Data Integrity Updated Jun 28, 2019 5 minute read Most Ruby developers work with Rails and Active Record for PostgreSQL database interactions. It provides a ton of magic and is simple to start with. Data integrity problems start creeping up once the code base and database structure gets older. In this tutorial, I will describe a couple of techniques f
New data privacy GDPR EU regulations are going live in less than two weeks. In this blog post, I will describe actions I took to add GDPR compliance to my Ruby on Rails SAAS app and this blog itself. Your apps must comply with new regulations even if you are not located in the EU. It is enough that you have European users. Disclaimer: I am not a lawyer, and this article does not constitute legal a
My RDS migration guide is now out! This is the eBook that I wish existed when I was first tasked with moving the Heroku database to AWS as a developer with limited dev ops experience. More details AWS S3 setup You will need Amazon AWS credentials to start working with file uploads. One common mistake is to use your primary user credentials instead of creating an IAM user with limited permissions.
Optimize Rails Performance with Redis Caching and Rack Middleware Updated Jun 28, 2019 6 minute read According to (a bit exaggerated) Pareto principle, 5% of your Rails app endpoints could account for 95% of performance issues. In this blog post I will describe how I improved a performance of my Rails application’s bottleneck endpoint by over 500% using a simple Redis caching technique and a custo
My RDS migration guide is now out! This is the eBook that I wish existed when I was first tasked with moving the Heroku database to AWS as a developer with limited dev ops experience. More details Here’s what I did: Put your Gemfile on a diet There is a Gem for that… In the Ruby world, dropping in a Gem to solve a problem is usually the “easiest” solution. Apart from other costs, memory bloat is o
このページを最初にブックマークしてみませんか?
『Performance Action Pack - a cost effective way to audit and optimize your Rai...』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く