<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jona</title>
    <description>The latest articles on DEV Community by Jona (@jonathandsouza).</description>
    <link>https://dev.to/jonathandsouza</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F730521%2F5c127451-d9c3-4ee3-8729-7ff80892aa4a.jpeg</url>
      <title>DEV Community: Jona</title>
      <link>https://dev.to/jonathandsouza</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jonathandsouza"/>
    <language>en</language>
    <item>
      <title>How to horizontally scale a NextJS application using PM2</title>
      <dc:creator>Jona</dc:creator>
      <pubDate>Sun, 02 Jul 2023 09:39:15 +0000</pubDate>
      <link>https://dev.to/jonathandsouza/how-to-horizontally-scale-a-nextjs-application-using-pm2-2j48</link>
      <guid>https://dev.to/jonathandsouza/how-to-horizontally-scale-a-nextjs-application-using-pm2-2j48</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;NodeJS server is single threaded in nature as such depending on the application there is only a finite amount of requests that can be handled by a single instance of the application.&lt;br&gt;
If the application is CPU intensive then the number of requests that can be handled by a single instance of the application will be even lower.&lt;/p&gt;

&lt;p&gt;Hence there are use cases where you would need to horizontally scale the application to handle more requests.&lt;/p&gt;

&lt;p&gt;In this article we will cover how to horizontally scale a NextJS application using PM2.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is horizontally scaling?
&lt;/h2&gt;

&lt;p&gt;Horizontal scaling, often referred to as scaling out, is the process of adding more machines or nodes to a system to improve performance and capacity.&lt;/p&gt;

&lt;p&gt;In our case we will be adding more instances of a NextJS application using PM2 process manager.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is PM2?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://pm2.keymetrics.io/"&gt;PM2&lt;/a&gt; is a daemon process manager that will help you manage and keep your application online 24/7.&lt;br&gt;
It has a lot of features that will help you in the process of deploying and maintaining your application.&lt;/p&gt;

&lt;p&gt;Additionally &lt;a href="https://pm2.keymetrics.io/"&gt;PM2&lt;/a&gt; allows you to run a nodeJS server in &lt;a href="https://pm2.keymetrics.io/docs/usage/cluster-mode/"&gt;cluster mode&lt;/a&gt;.&lt;br&gt;
Which dramatically improves the performance of your application and allows you to scale your application horizontally.&lt;/p&gt;
&lt;h2&gt;
  
  
  Implementation
&lt;/h2&gt;

&lt;p&gt;Setup a NextJS project&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-next-app@latest my-next-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install PM2 globally.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;pm2 &lt;span class="nt"&gt;-g&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a &lt;code&gt;ecosystem.config.js&lt;/code&gt; file in the root of the project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pm2 ecosystem
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Setup your ecosystem file as follows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;apps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;script&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;npm run start&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;instances&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;my-next-app&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Further ecosystem configuration options can be found &lt;a href="https://pm2.keymetrics.io/docs/usage/application-declaration/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Start the application using PM2.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pm2 start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can check the status of the application using the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pm2 monit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  SSG + ISR
&lt;/h2&gt;

&lt;p&gt;One last caveat to keep in mind is that if you are using &lt;a href="https://NextJS.org/docs/basic-features/data-fetching#getstaticprops-static-generation"&gt;SSG&lt;/a&gt; with &lt;a href="https://NextJS.org/docs/basic-features/data-fetching#incremental-static-regeneration"&gt;ISR&lt;/a&gt;&lt;br&gt;
then you will need to configure NextJS to stop using in memory cache and use &lt;a href="https://NextJS.org/docs/pages/building-your-application/data-fetching/incremental-static-regeneration#self-hosting-isr"&gt;file system cache instead.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add the following in &lt;code&gt;next.config.js&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;experimental&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Defaults to 50MB&lt;/span&gt;
        &lt;span class="na"&gt;isrMemoryCacheSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this article we covered how to horizontally scale a NextJS application using PM2.&lt;br&gt;
We also covered how to configure NextJS to use file system cache instead of in memory cache when using SSG with ISR.&lt;/p&gt;

&lt;p&gt;Also we configured pm2 to run 3 instances of the application.&lt;br&gt;
Similarly you can configure pm2 to run as many instances as you need.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://pm2.keymetrics.io/"&gt;PM2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://NextJS.org/"&gt;NextJS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://NextJS.org/docs/basic-features/data-fetching#getstaticprops-static-generation"&gt;SSG&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://NextJS.org/docs/basic-features/data-fetching#incremental-static-regeneration"&gt;ISR&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pm2.keymetrics.io/docs/usage/cluster-mode/"&gt;Cluster mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pm2.keymetrics.io/docs/usage/application-declaration/"&gt;Ecosystem configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://NextJS.org/docs/pages/building-your-application/data-fetching/incremental-static-regeneration#self-hosting-isr"&gt;Self hosting ISR&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>nextjs</category>
      <category>node</category>
      <category>performance</category>
    </item>
    <item>
      <title>Guide to Running a Node Server in Nx Monorepo using PM2 Process Manager</title>
      <dc:creator>Jona</dc:creator>
      <pubDate>Sun, 25 Jun 2023 11:01:52 +0000</pubDate>
      <link>https://dev.to/jonathandsouza/guide-to-running-a-node-server-in-nx-monorepo-using-pm2-process-manager-36n1</link>
      <guid>https://dev.to/jonathandsouza/guide-to-running-a-node-server-in-nx-monorepo-using-pm2-process-manager-36n1</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://pm2.keymetrics.io/"&gt;PM2&lt;/a&gt; is a daemon process manager that will help you manage and keep your application online 24/7.&lt;br&gt;
It has a lot of features that will help you in the process of deploying and maintaining your application.&lt;/p&gt;

&lt;p&gt;Additionally &lt;a href="https://pm2.keymetrics.io/"&gt;PM2&lt;/a&gt; allows you to run a nodeJS server in &lt;a href="https://pm2.keymetrics.io/docs/usage/cluster-mode/"&gt;cluster mode&lt;/a&gt;.&lt;br&gt;
Which dramatically improves the performance of your application and allows you to scale your application horizontally.&lt;/p&gt;

&lt;p&gt;In this article we will cover the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Setting up a &lt;a href="https://nx.dev/"&gt;Nx monorepo&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Setting up a &lt;a href="https://nestjs.com/"&gt;NestJS&lt;/a&gt; project within the Nx Monorepo.&lt;/li&gt;
&lt;li&gt;Running NestJS with &lt;a href="https://pm2.keymetrics.io/"&gt;PM2&lt;/a&gt; using &lt;a href="https://www.npmjs.com/package/nx-pm2-plugin"&gt;Nx-PM2-Plugin&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It must be noted that the same approach can be used for any nodeJS project within Nx.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Setting up a Nx Monorepo
&lt;/h2&gt;

&lt;p&gt;In this section we will be setting up a &lt;a href="https://nx.dev/"&gt;Nx monorepo&lt;/a&gt; using the &lt;a href="https://nx.dev/tutorials/integrated-repo-tutorial"&gt;integrated mode&lt;/a&gt; scheme.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-nx-workspace@latest myorg &lt;span class="nt"&gt;--preset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A comprehensive guide to setting up the Nx monorepo can be found &lt;a href="https://nx.dev/tutorials/integrated-repo-tutorial"&gt;here&lt;/a&gt;;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Setting up NestJS
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://nx.dev/"&gt;Nx&lt;/a&gt; provides a &lt;a href="https://nestjs.com/"&gt;NestJS&lt;/a&gt; schematics to setup a NestJS project within the monorepo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-D&lt;/span&gt; @nx/nest
npx nx g @nx/nest:app my-nest-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A comprehensive guide to setup NestJS within Nx can be found &lt;a href="https://nx.dev/packages/nest"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3.Running NestJS with PM2
&lt;/h2&gt;

&lt;p&gt;Install PM2 globally.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;pm2 &lt;span class="nt"&gt;-g&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install &lt;a href="https://www.npmjs.com/package/nx-pm2-plugin"&gt;Nx-PM2-Plugin&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i nx-pm2-plugin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the following task to project.json of the NestJS project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"pm2"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"executor"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"nx-pm2-plugin:pm2-executor"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"options"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"my-nest-app:serve:production"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"example"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can now run the task using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nx run my-nest-app:pm2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can monitor the service instances using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pm2 monit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://pm2.keymetrics.io/"&gt;PM2&lt;/a&gt; is a daemon process manager that will help you manage and keep your application online 24/7. It has a lot of features that will help you in the process of deploying and maintaining your application.&lt;/p&gt;

</description>
      <category>nx</category>
      <category>pm2</category>
      <category>node</category>
    </item>
    <item>
      <title>Mutually exclusive experiments in Google Optimize</title>
      <dc:creator>Jona</dc:creator>
      <pubDate>Thu, 24 Nov 2022 12:26:50 +0000</pubDate>
      <link>https://dev.to/jonathandsouza/mutually-exclusive-experiments-in-google-optimize-1l8</link>
      <guid>https://dev.to/jonathandsouza/mutually-exclusive-experiments-in-google-optimize-1l8</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fui6sXd7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nn3vwmy7mq8s2cbv2tm1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fui6sXd7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nn3vwmy7mq8s2cbv2tm1.png" alt="siloing users" width="789" height="675"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;One of the Achilles heels of &lt;a href="https://optimize.google.com/"&gt;Google optimize&lt;/a&gt; as an AB testing platform is how they bucket users into experiments. Users are often placed into multiple experiments at the same time without the possibility of natively having the users bucketed into only a single experiment at a time. In this post I will highlight an approach to ensure that experiments are &lt;strong&gt;mutually exclusive&lt;/strong&gt; i.e. a user will only be placed in a single experiment at a time. &lt;/p&gt;

&lt;h2&gt;
  
  
  Siloing Your Users.
&lt;/h2&gt;

&lt;p&gt;When a user visits your website, we execute the following steps: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check if the guest has already been siloed, if not proceed. &lt;/li&gt;
&lt;li&gt;Generate a random number between 1-100.&lt;/li&gt;
&lt;li&gt;Create a cookie and store the number generated in the previous step.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if(!window.vuCookies.get('vu.silo')) {
window.vuCookies.set('vu.silo', Math.floor(Math.random() * 100)+1, 365);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*Note: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The window.vuCookies is custom code. &lt;/li&gt;
&lt;li&gt;This code must be placed before the Google Optimize script. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Audience Targeting
&lt;/h2&gt;

&lt;p&gt;Set the audience targeting condition on the experiment level. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ccnUAhfp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wzfwlkq53ulx70bvwp2a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ccnUAhfp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wzfwlkq53ulx70bvwp2a.png" alt="Audience targeting" width="880" height="109"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dxqdm1Pw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xsta3ty17wm03b05lvjd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dxqdm1Pw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xsta3ty17wm03b05lvjd.png" alt="Audience targeting by cookie" width="880" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rScpVF0z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ahb85y09ic73js4umms.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rScpVF0z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ahb85y09ic73js4umms.png" alt="siloing condition" width="880" height="580"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In order to have accurate AB testing results its paramount that a user is not bucketed into multiple experiments. The approach outlined in this article will ensures tests remains mutually exclusive.&lt;/p&gt;

</description>
      <category>googleoptimize</category>
    </item>
    <item>
      <title>Should layout markup be a component in React?</title>
      <dc:creator>Jona</dc:creator>
      <pubDate>Tue, 19 Oct 2021 16:23:35 +0000</pubDate>
      <link>https://dev.to/jonathandsouza/should-layout-markup-be-a-component-in-react-4k5k</link>
      <guid>https://dev.to/jonathandsouza/should-layout-markup-be-a-component-in-react-4k5k</guid>
      <description>&lt;p&gt;Do layout markup  need to be a component of its own?&lt;/p&gt;

&lt;p&gt;For example &lt;/p&gt;

&lt;p&gt;Do we need a Card component that adds a border and padding to a card like soo&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
 ....&lt;/p&gt;



&lt;p&gt;Instead of using a pure html + css solution like &lt;/p&gt;

&lt;p&gt;...&lt;/p&gt;

&lt;p&gt;I really like the second approach and I feel like lesser components are a better solution from a performance perspective. &lt;/p&gt;

&lt;p&gt;On the other hand the second solution follows atomic design.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
