How to add Elastic APM Support in Dotnet Framework

These days for every web application, there has always been the need to monitor application performance, but not always do it well. Similar is the case with the .NET application, but then we found Elastic APM, which is the best solution over this need. Here in this article, we will look at how to use Elastic APM in any .NET application. What is Elastic APM? Elastic APM is an application performance monitoring system. It's a real-time monitoring tool for applications. With Elastic APM, we can determine information on requests, responses, database queries, and external HTTP requests. Current version available for

Server-Side Rendering : Summarized

In Web Development, one of the core decisions developers have to make is to decide where to implement rendering in their application. The two most common rendering techniques are Client-Side Rendering: renders web page on the browser Server-Side Rendering: renders web page on the server Let's understand both the techniques in detail. Server Side Rendering VS Client Side Rendering: Before understanding both the techniques, let's get familiar with the following two important Performance Metrics: First Contentful Paint (FCP): This metric measures the time from when the page starts loading to the time when any part of the page's content is

Scaling Enterprise SaaS Platform with Microservices

Spoiler Alert: This article is not about Microservices architecture or how microservices works. In this article, I will share what we have learned in scaling one of the large SaaS platform, our ongoing improvements and how Microservices architecture is playing a key role in scaling this SaaS platform. This SaaS Platform has experienced tremendous growth in the past 18 months. It has now become one of the leading CRMs in North America. Everyone’s definition of “scale” and “growth” can differ based on specific numbers or metric a company is targeting i.e. revenue, user base, or others. We are

Performance Optimisations on a Rails App

Method Missing Method Missing is one of the concepts of metaprogramming ruby. Although metaprogramming is very powerful it too has some shortcomings especially speed. A normal method is comparatively 1.5x times faster than a missing method. One of our users complained about our calendar page being very slow - on inspecting we found request was taking more than 30 seconds for loading the month view of the calendar and eventually request timed out. The user had lots of activities on that calendar - 2000+. On further inspection, we found our DB query was quite fast but each activity was

Adding new column with default value to high volume database table

Almost all Ruby on Rails developers might come across scenario where they need to add a new column with a default value to one of the database tables. Most of us (including me) would write following migration statement - add_column :table_name, :column_name, :boolean, default: false This is a good practice but would cause downtime if the table has large number of records. It took 3 secs when I ran the migration for a table having 50k records. -- add_column(:table_name, :column_name, :boolean, {:default=>false}) -> 3.3695s 3 secs is a long

Better performance with Index type `varchar_pattern_ops` operator_class in Rails

Rails has provision to provide order of indexing on a column for better performance of like queries. The varchar_pattern_ops improves the performance of like queries by 4 times i.e 4x. For example, lets have this like query on name column (that has sequential index.) Select * from users where name like 'John%' We might have added a regular Rails index in migration for this name column as add_index :users, :name - This will generate a sequential index. The same can be made 4 times faster using btree index by adding xxx_pattern_ops options add_index

Benchmarking in Rails console - Know performance of a code snippet

Lets say we need to benchmark and evaluate the performance of code snippet. This is how we can easily do on Rails console using "Benchmark.ms" require 'benchmark' 1.9.3-p392 :001 > Benchmark.measure do 1.9.3-p392 :002 > "john mark McMillan".split(" ").collect{|word|word[0] = word[0].upcase; word}.join(" ") 1.9.3-p392 :003?> end => #<Benchmark::Tms:0x00007ff6cd8face8 @label="", @real=1.600012183189392e-05, @cstime=0.0, @cutime=0.0, @stime=2.9999999999960614e-06, @utime=1.8999999999991246e-05, @total=2.1999999999987307e-05 1.9.3-p392 :004 > Benchmark.

Performance Optimization

In a Ruby On Rails applications where we follow convention over configuration, we might get hit by a slow server response, that would eventually cost users shy away from application. There are many ways of how you can boost performance of Ruby On Rails applications. Focusing on approach depending on the application structure, size of the database and traffic intensity, our performance optimization can be carried out. Rules for Performance Optimization Measure Optimize What is slow Test and Isolate changes Primary areas to think about where we can improve performance are Views and ActiveRecord Queries PS Note : Will be continued.

ZEUS test_environment

Just found that I couldn't do zeus c test for a test environment console Here's a workaround or small hack to do this Steps On your console do zeus init This will create two files zeus.json custom_plan.rb Add this snippet to your custom_plan.rb and define the tasks for Zeus. Mine looks like this: require 'zeus/rails' class CustomPlan Edit zeus.json to include only the tasks for which you’ll use Zeus. Mine looks like this: { "command": "ruby -rubygems -r./custom_plan -eZeus.go", "plan": { "boot": { "default_bundle": { "development_environment": { "prerake": {"rake": []}, "runner": ["r"], "console"