サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
Wikipedia
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
Inheritance and Abstract Class Pattern for Ruby on Rails Controllers 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.
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
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 How to “Brute-force” detect validation errors I want to share a dirty hack I’ve recently come up with. It might seem obvious and resorting to it look like a signal of a very poor codebase quality but bea
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 Logs and GDPR NGINX logs rotation NGINX access logs contain IP address of the users. According to the regulation, it is a piece of information which can be used to identify users and therefore should be
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.
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 Before Rails performance optimization A detailed performance benchmark results before I started the whole optimization process: Transactions: 5489 hits Availability: 100.00 % Elapsed time: 59.47 secs Dat
Reduce Rails Memory Usage, Fix Leaks, R14 and Save Money on Heroku Updated Apr 26, 2023 5 minute read In theory, you can run both Rails web server and Sidekiq process on one 512mb Heroku dyno. For side projects with small traffic, saving $7/month always comes in handy. Unfortunately when trying to fit two Ruby processes on one dyno you can run into memory issues, leaks and R14 quota exceeded error
このページを最初にブックマークしてみませんか?
『Rails, PostgreSQL Performance Audit and Tuning Consultant for Hire』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く