<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>performance &#8211; Rafael Bernard Araujo</title>
	<atom:link href="https://rafael.bernard-araujo.com/tag/performance/feed" rel="self" type="application/rss+xml" />
	<link>https://rafael.bernard-araujo.com</link>
	<description>desenvolvendo... while(!success){  try(); }</description>
	<lastBuildDate>Thu, 14 Aug 2025 22:42:18 +0000</lastBuildDate>
	<language>pt-BR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">21941730</site>	<item>
		<title>Solving problems 1: ECS, Event Bridge Scheduler, PHP, migrations</title>
		<link>https://rafael.bernard-araujo.com/solving-problems-1-ecs-event-bridge-scheduler-php-migrations.php</link>
					<comments>https://rafael.bernard-araujo.com/solving-problems-1-ecs-event-bridge-scheduler-php-migrations.php#respond</comments>
		
		<dc:creator><![CDATA[rafael]]></dc:creator>
		<pubDate>Thu, 30 Nov 2023 08:40:27 +0000</pubDate>
				<category><![CDATA[Solving Problems]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ecs fargate]]></category>
		<category><![CDATA[EventBridge]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[test automation]]></category>
		<guid isPermaLink="false">https://rafael.bernard-araujo.com/?p=1865</guid>

					<description><![CDATA[I love Mondays and Business as Usual. Solving problems is a delightful day-to-day task. Maybe this is what working with software means in the end. Do not take me wrong, it opens the doors for greenfield projects and experimentation. While mastering the business I can experiment, change and rebuild. The solving problems series is just [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I love Mondays and Business as Usual. Solving problems is a delightful day-to-day task. Maybe this is what working with software means in the end. Do not take me wrong, it opens the doors for greenfield projects and experimentation. While mastering the business I can experiment, change and rebuild.</p>
<p>The solving problems series is just a way to share small ideas, experiences and outcomes of solving daily problems as I go. I wonder if some tips or experiences shared can help you build better what you are working on right now.</p>
<hr />
<p>During the last months, <a href="https://dev.to/lpossamai/smooth-sailing-from-aws-ec2-to-ecs-a-comprehensive-migration-guide-2dci">I have been migrating</a> an important <a href="https://www.php.net/">PHP</a> service to <a href="https://aws.amazon.com/ecs/">ECS Fargate</a> along with the runtime upgrade. The service is composed of a lot of parts and we have been architecting the migration so the operation causes no downtime to customers, even when they are over four different continents and many time zones.</p>
<p>One very important part of the service is already running in production for some months with success. We are preparing the next service.</p>
<p>For the migration plan, we deployed infrastructure ahead of starting moving traffic, planned to daily incremental traffic switch, like 5, 10, 25, 50, 75, and close monitoring. Also prepared a second plan to avoid rollback in case some performance issue arises. While monitoring we created backlog tickets with the observability outcomes.</p>
<p>During migration phases prepare yourself beforehand for the initial (1%, or 5%) traffic switch, so you can catch quickly those hidden use cases that only happen in production and act quickly. If you do so, other phases are just a matter of watching how scaling works.</p>
<p>Using containers (of course Kubernetes is a great alternative) is a fantastic opportunity to upgrade PHP runtimes efficiently at the same time where we use a much better platform that helps with delivery and developer experiences. The very first and most important step I recommend is to review how you deal with your secret and environment variables. This is pivotal for the success of a smooth migration.</p>
<p>We can expect that those type of applications has a fair amount of cron jobs associated with them. This is a great opportunity to follow the old saying &quot;use the right tool for the right problem&quot; and my suggestion would be to rewrite it, turning it into <a href="https://aws.amazon.com/lambda/">Lambda</a> or <a href="https://aws.amazon.com/step-functions/">Step Functions</a>, as applicable to each of what the cron job is doing. This is closer to what and how a job should run.</p>
<p>It happens that not always we can start refactoring right away, and then I can say that my experiences with <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/using-eventbridge-scheduler.html">Event Bridge Scheduler</a> triggering ECS tasks (previously cron jobs) are great. They are interestingly cheap alternatives while waiting for the refactoring project to take over. Don't take this as your permanent solution though, because it is not just right and a waste of resources and couple the cron job too much with parts of the application not really related.</p>
<p>We were reviewing the backlog and observability results of the last service. As we could prioritise and execute some backlog tickets, the dashboard and metrics highlighted that we had some room to review scaling and resource thresholds. We changed them carefully, resulting in a bill ~50% cheaper, CPU and memory resource stable and no performance degradation.</p>
<p>Some notes:</p>
<ul>
<li>Investing in test automation is good for your developer experience, site reliability and revenue; also a great support for technology improvements</li>
<li>It is worth taking a look at the <a href="https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_PredefinedMetricSpecification.html"><code>ALBRequestCountPerTarget</code></a> metric if you have CPU-heavy processes as you can better control how <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html">ECS will handle scale policies</a>, avoiding peak of CPU where the CPU average metric is not enough for scaling</li>
</ul>
<p>Links:</p>
<ul>
<li><a href="https://dev.to/lpossamai/smooth-sailing-from-aws-ec2-to-ecs-a-comprehensive-migration-guide-2dci">https://dev.to/lpossamai/smooth-sailing-from-aws-ec2-to-ecs-a-comprehensive-migration-guide-2dci</a></li>
<li><a href="https://www.php.net/">https://www.php.net/</a></li>
<li><a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/using-eventbridge-scheduler.html">https://docs.aws.amazon.com/eventbridge/latest/userguide/using-eventbridge-scheduler.html</a></li>
<li><a href="https://docs.aws.amazon.com/AmazonECS/latest/userguide/what-is-fargate.html">https://docs.aws.amazon.com/AmazonECS/latest/userguide/what-is-fargate.html</a></li>
<li><a href="https://aws.amazon.com/ecs/">https://aws.amazon.com/ecs/</a></li>
<li><a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html">https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html</a></li>
<li><a href="https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_PredefinedMetricSpecification.html">https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_PredefinedMetricSpecification.html</a></li>
<li><a href="https://aws.amazon.com/lambda/">https://aws.amazon.com/lambda/</a></li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://rafael.bernard-araujo.com/solving-problems-1-ecs-event-bridge-scheduler-php-migrations.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1865</post-id>	</item>
		<item>
		<title>Tropeçando 111</title>
		<link>https://rafael.bernard-araujo.com/tropecando-111.php</link>
					<comments>https://rafael.bernard-araujo.com/tropecando-111.php#respond</comments>
		
		<dc:creator><![CDATA[rafael]]></dc:creator>
		<pubDate>Mon, 30 Oct 2023 07:37:05 +0000</pubDate>
				<category><![CDATA[Tropeçando]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[software architecture]]></category>
		<category><![CDATA[software engineering]]></category>
		<guid isPermaLink="false">https://rafael.bernard-araujo.com/?p=1851</guid>

					<description><![CDATA[Don't do this: creating useless indexes This is why, when I’m called for a performance problem (or for an audit), my first take is to look at the size of the data compared to the size of the indexes. If you store more indexes than data for a transactional workload, that’s bad. The worst I’ve [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="https://web.archive.org/web/20240525164456/https://mydbanotebook.org/post/too-many-indexes/">Don't do this: creating useless indexes</a></p>
<blockquote><p>
This is why, when I’m called for a performance problem (or for an audit), my first take is to look at the size of the data compared to the size of the indexes. If you store more indexes than data for a transactional workload, that’s bad. The worst I’ve seen was a database with 12 times more indexes stored on disk than data! Of course, it was a transactional workload… Would you buy a cooking book with 10 pages of recipes and 120 pages of indexes at the end of the book?</p>
<p>The problem with indexes is that each time you write (insert, update, delete), you will have to write to the indexes too! That can become very costly in resources and time.
</p></blockquote>
<p><a href="http://blog.cleancoder.com/uncle-bob/2023/01/18/functional-classes.html">Functional Classes</a></p>
<blockquote>
<blockquote><p>
A place for everything, and everything in its place.
</p></blockquote>
<p>What is a class? According to the dictionary a class is:</p>
<blockquote><p>
A set, collection, group, or configuration containing members regarded as having certain attributes or traits in common; a kind or category.
</p></blockquote>
</blockquote>
<p><a href="https://frederickvanbrabant.com/blog/2019-04-03-the-simple-class/">The Simple Class</a></p>
<blockquote><p>
I work in many legacy code bases, and in fact, I’ve made it a big part of my career. I love diving into big monoliths that have grown out of proportion and tidying them up. One of the best parts of that work is rewriting a God class into a collection of small reusable classes. Let’s take a look at what makes a simple class great.
</p></blockquote>
<p><a href="https://frederickvanbrabant.com/blog/2020-02-07-the-economics-of-clean-code/">The economics of clean code</a></p>
<blockquote><p>
Code smarter. Code balanced. That is OK to have some debt. But pay them off quickly.
</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://rafael.bernard-araujo.com/tropecando-111.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1851</post-id>	</item>
		<item>
		<title>Tropeçando 20 &#8211; Republish</title>
		<link>https://rafael.bernard-araujo.com/tropecando-20-republish.php</link>
					<comments>https://rafael.bernard-araujo.com/tropecando-20-republish.php#respond</comments>
		
		<dc:creator><![CDATA[rafael]]></dc:creator>
		<pubDate>Fri, 21 Oct 2022 15:49:44 +0000</pubDate>
				<category><![CDATA[Tropeçando]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sharing]]></category>
		<category><![CDATA[tools]]></category>
		<guid isPermaLink="false">https://rafael.bernard-araujo.com/?p=1663</guid>

					<description><![CDATA[Activate Remote Desktop REMOTELY!!! &#124; commandlinefu.com PHP é à quinta-feira – 50 dicas sobre desempenho e segurança &#124; Peopleware Howto access ext3 partition from Windows &#124; Ubuntu Geek This tutorial will allow you to access your ext3 partition under Windows, using Sun VirtualBox and Ubuntu. The tutorial is pretty long due to the images, but [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://www.commandlinefu.com/commands/view/4657/activate-remote-desktop-remotely">Activate Remote Desktop REMOTELY!!! | commandlinefu.com</a></p>
<p><a href="http://pplware.sapo.pt/2010/01/14/php-e-a-quinta-feira-50-dicas-sobre-desempenho-e-segurana/">PHP é à quinta-feira – 50 dicas sobre desempenho e segurança | Peopleware</a></p>
<p><a href="https://web.archive.org/web/20210428025706/http://www.ubuntugeek.com/howto-access-ext3-partition-from-windows.html">Howto access ext3 partition from Windows | Ubuntu Geek</a></p>
<blockquote><p>
This tutorial will allow you to access your ext3 partition under Windows, using Sun VirtualBox and Ubuntu. The tutorial is pretty long due to the images, but they explain things easier sometimes (they are not just meaningless screenshots) (forgive me for your scroll button <img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f61b.png" alt="😛" class="wp-smiley" style="height: 1em; max-height: 1em;" /> )
</p></blockquote>
<p><a href="http://uploadpie.com/">Upload Pie - The Simple Image Sharing Tool</a></p>
<blockquote><p>
Sharing files with expiration dates
</p></blockquote>
<p><a href="http://www.mantisbt.org/">Mantis Bug Tracker</a></p>
<blockquote><p>
Gerenciamento de erros
</p></blockquote>
<p><a href="https://www.tiobe.com/tiobe-index/">TIOBE Software: Tiobe Index</a></p>
<blockquote><p>
Index of languages being used around the world.
</p></blockquote>
<p><a href="http://www.republicavirtual.com.br/busca_de_cep/PHP/#php">Busca de CEP em PHP, Ajax, PHP, ASP, Java, Python, Flash, XML, C#, Ruby</a></p>
<p><a href="https://css-tricks.com/color-fading-menu-with-jquery/" class="broken_link">Color Fading Menu with jQuery | CSS-Tricks</a></p>
<p><a href="https://web.archive.org/web/20210302235227/http://www.ubuntugeek.com/increase-your-internet-speed-with-namebench.html">Increase your internet speed with Namebench | Ubuntu Geek</a></p>
<p><a href="http://www.ubuntudicas.com.br/2010/01/guia-de-referencia-de-comando-em-pt-br/">Guia de referência de comando em PT-BR | Ubuntu Dicas</a></p>
<blockquote><p>
Uma lista com os comandos mais usados no linux em português brasileiro. É possível salvar os comandos em algum imagem para que fique como um papel de parede.
</p></blockquote>
<p><a href="http://blog.mhavila.com.br/2010/02/19/fraude-surpreendo-proteja-seus-dados-pessoais/">Blog do Márcio d’Ávila » Fraude Surpreendo - Proteja seus dados pessoais</a></p>
<p><a href="https://web.archive.org/web/20231105214819/http://wiki.ubuntu-br.org/RootSudo">RootSudo - Ubuntu Brasil</a></p>
<p><a href="http://jmmwrite.wordpress.com/2010/02/23/1065/">Ripando e Gerando DVDs no Linux de forma simples « jmmwrite – simples e direto</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://rafael.bernard-araujo.com/tropecando-20-republish.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1663</post-id>	</item>
		<item>
		<title>PHP Memory Usage and Performance Improvements Tips</title>
		<link>https://rafael.bernard-araujo.com/php-memory-usage-and-performance-improvements-tips.php</link>
					<comments>https://rafael.bernard-araujo.com/php-memory-usage-and-performance-improvements-tips.php#respond</comments>
		
		<dc:creator><![CDATA[rafael]]></dc:creator>
		<pubDate>Mon, 06 Sep 2021 16:55:25 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[software engineering]]></category>
		<guid isPermaLink="false">https://rafael.bernard-araujo.com/?p=1415</guid>

					<description><![CDATA[Memory usage and performance improvements make everybody happier, from end-user to cloud and infrastructure engineers. And they are all right, and this is an optimization that we should try to achieve as much as possible. I am also keeping this page for a reference to my future self because we cannot rely too much on [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Memory usage and performance improvements make everybody happier, from end-user to cloud and infrastructure engineers. And they are all right, and this is an optimization that we should try to achieve as much as possible.</p>
<p>I am also keeping this page for a reference to my future self because we cannot rely too much on our memory, and that will be a good reference I want to re-visit. I will make constant updates on this page.</p>
<h2></h2>
<h2><a href="https://www.slideshare.net/nikita_ppv/php-performance-trivia/31">Use objects with declared properties over array</a></h2>
<p>Arrays have a larger footprint to avoid constant memory pointers reassignments. It then reserves large amounts of memory when more elements or indexes are added.</p>
<p><img data-recalc-dims="1" height="150" width="150" decoding="async" src="https://i0.wp.com/rafael.bernard-araujo.com/wp-content/uploads/2021/09/php-performance-trivia-32-1024.webp?resize=150%2C150&#038;ssl=1" alt="Image for array vs object memory usage" /></p>
<h2></h2>
<h2><a href="https://www.slideshare.net/nikita_ppv/php-performance-trivia/39">Be careful to self-referencing that would prevent garbage collector from work</a></h2>
<p>Garbage collector is working as expected when the internal reference count (how may times a value is used) reaches zero:</p>
<pre><code class="language-php">$x = "foobar";    // refcount = 1
$y = $x;            // refcount = 2
unset($x);      // refcount = 1
unset($y);      // refcount = 0 -&gt; garbage collector will be happy ==&gt; Destroy!</code></pre>
<p>But self-referencing can be tricky:</p>
<pre><code class="language-php">$x = [];            // refcount = 1
$x[0] =&amp; $x;    // refcount = 2
unset($x);      // refcount = 1
                    // It will never come to zero due to cycle</code></pre>
<p>The cycle collector will eventually destroy it, but it will hang on memory for a while anyway.</p>
<h2>Sprintf vs double/single quote concatenation</h2>
<p>A very common use case is string concatenation or interpolation when you want to add a variable into a static string. It is interesting to note that:</p>
<p>If you have PHP &lt; 7.4, use double-quote interpolation or single quote concatenation over <code>sprintf</code> function.</p>
<pre><code class="language-php">&lt;?php 

$this-&gt;start($loop);

ob_start();

for ($i = 0; $i &lt; $this-&gt;loop; ++$i) {
    print &#039;Lorem &#039;.$i.&#039; ipsum dolor sit amet, consectetur adipiscing elit. Proin malesuada, nisl sit amet congue blandit&#039;;
}

ob_end_clean();

return $this-&gt;end();</code></pre>
<p>If you have PHP greater than 7.4, use <code>sprintf</code>:</p>
<pre><code class="language-php">&lt;?php 

$this-&gt;start($loop);

for ($i = 0; $i &lt; $this-&gt;loop; ++$i) {
    $value = sprintf(&#039;Lorem %s ipsum dolor sit amet, consectetur adipiscing elit. Proin malesuada, nisl sit amet congue blandit&#039;, $i);
}

return $this-&gt;end();</code></pre>
<ul>
<li><a href="https://php.lito.com.es/test/compare/SprintfTest/PrintSingleQuoteCodeConcatTest">https://php.lito.com.es/test/compare/SprintfTest/PrintSingleQuoteCodeConcatTest</a></li>
<li><a href="https://php.lito.com.es/test/compare/SprintfTest/PrintDoubleQuoteCodeTest">https://php.lito.com.es/test/compare/SprintfTest/PrintDoubleQuoteCodeTest</a></li>
</ul>
<h2><a href="https://www.phpbench.com/" class="broken_link">PHP Benchmarking</a></h2>
<blockquote><p>PHPBench.com was constructed as a way to open people's eyes to the fact that not every PHP code snippet will run at the same speed. You may be surprised at the results that this page generates, but that is ok. This page was also created so that you would be able to find discovery in these statistics and then maybe re-run these tests in your own server environment to play around with this idea yourself, by using the code examples (these code examples are automatically generated and as the code in my .php files change, so do they).</p></blockquote>
<h2></h2>
<h2><a href="https://php.lito.com.es/">PHP benchmarks and optimizations</a></h2>
<blockquote><p>Collection of tests and benchmarks for common operations in PHP. Tests run on several versions of PHP. There is an option to compare different solutions for the same problem to compare performances between them, such as checking values with <code>isset</code> against <code>!empty</code>.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://rafael.bernard-araujo.com/php-memory-usage-and-performance-improvements-tips.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1415</post-id>	</item>
		<item>
		<title>Tropeçando 82</title>
		<link>https://rafael.bernard-araujo.com/tropecando-82.php</link>
					<comments>https://rafael.bernard-araujo.com/tropecando-82.php#respond</comments>
		
		<dc:creator><![CDATA[rafael]]></dc:creator>
		<pubDate>Wed, 18 Jul 2018 17:28:51 +0000</pubDate>
				<category><![CDATA[Tropeçando]]></category>
		<category><![CDATA[Banco de dados]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[documentação]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nodejs]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[PostGreSQL]]></category>
		<category><![CDATA[varnish]]></category>
		<guid isPermaLink="false">https://rafael.bernard-araujo.com/?p=1268</guid>

					<description><![CDATA[docz It has never been so easy to document your things! usql A universal command-line interface for PostgreSQL, MySQL, Oracle Database, SQLite3, Microsoft SQL Server, and many other databases including NoSQL and non-relational databases! Agendando tarefas com o Cron para Node O Cron para Node é um pacote npm que nos permite fazer o agendamento [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.docz.site/" target="_blank" rel="noopener">docz</a></p>
<blockquote><p>It has never been so easy to document your things!</p></blockquote>
<p><a href="https://github.com/xo/usql" rel="noopener" target="_blank">usql</a></p>
<blockquote><p>A universal command-line interface for PostgreSQL, MySQL, Oracle Database, SQLite3, Microsoft SQL Server, and many other databases including NoSQL and non-relational databases!</p></blockquote>
<p><a href="https://imasters.com.br/desenvolvimento/agendando-tarefas-com-o-cron-para-node" rel="noopener" target="_blank">Agendando tarefas com o Cron para Node</a></p>
<blockquote><p>O Cron para Node é um pacote npm que nos permite fazer o agendamento de tarefas baseado em uma regra de tempo. Ele é baseado no Cron do Linux e seu funcionamento segue a mesma linha. Com ele é possível definir uma função para ser executada de tempos em tempos, ou seja, ela será agendada para ser executada dentro do Node. É uma maneira bastante eficaz para tarefas repetitivas que precisam rodar em segundo plano, como o envio de notificação, backup de banco de dados, entre outras.</p></blockquote>
<p><a href="https://info.varnish-software.com/blog/one-vcl-per-domain" rel="noopener" target="_blank">Howto: use one VCL per domain</a></p>
<blockquote><p>The Varnish Configuration Language (VCL), I'm sure you know already, is the source of Varnish versatility: by only enforcing the protocol flow and leaving the business logic to the user, Varnish can be easily configured to do things far beyond caching.</p>
<p>However, because the logic of websites is generally focused around hosts, and the VCL thinks in terms of processing steps, configuration may sometimes a bit odd, with the need to place safeguards around your code to ensure that logic for one host isn't applied to another one.</p>
<p>It works, but it can be tedious and unwieldy, so today we are going to have a look at how we can silo our VCL per website to achieve better maintainability.</p></blockquote>
<p><a href="https://dzone.com/articles/understanding-the-8-fallacies-of-distributed-syste?edition=386204&utm_source=Weekly%20Digest&utm_medium=email&utm_campaign=Weekly%20Digest%202018-07-18" rel="noopener" target="_blank">Understanding the 8 Fallacies of Distributed Systems</a></p>
<blockquote><p>Are you working on a distributed system? Microservices, Web APIs, SOA, web server, application server, database server, cache server, load balancer - if these describe components in your system's design, then the answer is yes. Distributed systems are comprised of many computers that coordinate to achieve a common goal.</p>
<p>More than 20 years ago Peter Deutsch and James Gosling defined the 8 fallacies of distributed computing. These are false assumptions that many developers make about distributed systems. These are usually proven wrong in the long run, leading to hard to fix bugs.</p></blockquote>
<p><a href="https://severalnines.com/blog/postgresql-tuning-key-things-drive-performance" rel="noopener" target="_blank">PostgreSQL Tuning: Key Things to Drive Performance</a></p>
<blockquote><p>Performance is one of the key requirements in software architecture design, and has been the focus of PostgreSQL developers since its beginnings</p></blockquote>
<p><a href="https://medium.com/@nunomaduro/illuminate-your-career-d608edb4ba2" rel="noopener" target="_blank">Illuminate your career</a></p>
<blockquote><p>If you are a developer, this article is for you.</p></blockquote>
<p><a href="https://www.toptal.com/api-developers/5-new-things-rest-specification" rel="noopener" target="_blank">5 Things You Have Never Done with a REST Specification</a></p>
<p><a href="https://dzone.com/articles/how-backup-linux-snapshots" rel="noopener" target="_blank">How to to Backup Linux with Snapshots</a></p>
<blockquote><p> While working on different web projects I have accumulated a large pool of tools and services to facilitate the work of developers, system administrators and DevOps<br />
One of the first challenges, that every developer faces at the end of each project is backup configuration and maintenance of media files, UGC, databases, application and servers' data  (e.g. configuration files). </p></blockquote>
<p><a href="https://github.com/ziadoz/awesome-php" rel="noopener" target="_blank">Awesome PHP</a></p>
<blockquote><p>A curated list of amazingly awesome PHP libraries, resources and shiny things.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://rafael.bernard-araujo.com/tropecando-82.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1268</post-id>	</item>
		<item>
		<title>Tropeçando 79</title>
		<link>https://rafael.bernard-araujo.com/tropecando-79.php</link>
					<comments>https://rafael.bernard-araujo.com/tropecando-79.php#respond</comments>
		
		<dc:creator><![CDATA[rafael]]></dc:creator>
		<pubDate>Thu, 28 Dec 2017 00:47:37 +0000</pubDate>
				<category><![CDATA[Tropeçando]]></category>
		<category><![CDATA[aplicação]]></category>
		<category><![CDATA[Banco de dados]]></category>
		<category><![CDATA[infraestrutura]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[PostGreSQL]]></category>
		<category><![CDATA[varnish]]></category>
		<guid isPermaLink="false">https://rafael.bernard-araujo.com/?p=1247</guid>

					<description><![CDATA[Plan for the unexpected: install diagnostic tools on your PostgreSQL servers There’s a lot of information out there on how to configure PostgreSQL, on the importance of backups and testing them, etc. But what about the server you run PostgreSQL on? We tend to pay a lot less attention to tools that you won’t need [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="https://web.archive.org/web/20180311090306/https://blog.2ndquadrant.com/postgresql-install-debuginfo/" rel="noopener" target="_blank">Plan for the unexpected: install diagnostic tools on your PostgreSQL servers</a></p>
<blockquote><p>There’s a lot of information out there on how to configure PostgreSQL, on the importance of backups and testing them, etc.</p>
<p>But what about the server you run PostgreSQL on? We tend to pay a lot less attention to tools that you won’t need unless something breaks. But it’s worth taking some time to do so now, because that’s time you won’t have when your server is down and you’re in a rush.</p></blockquote>
<p><a href="https://www.sql-workbench.eu/dbms_comparison.html" rel="noopener" target="_blank">SQL Feature Comparison</a></p>
<blockquote><p>This comparison focuses on SQL features that can be used in SQL statements or self-contained SQL scripts that don't require additional software (e.g. a compiler) to be usable. Features for database administration or deployment are also not the focus of this comparison. </p></blockquote>
<p><a href="https://hacks.mozilla.org/2017/09/building-the-dom-faster-speculative-parsing-async-defer-and-preload/" rel="noopener" target="_blank">Building the DOM faster: speculative parsing, async, defer and preload</a></p>
<blockquote><p>In 2017, the toolbox for making sure your web page loads fast includes everything from minification and asset optimization to caching, CDNs, code splitting and tree shaking. However, you can get big performance boosts with just a few keywords and mindful code structuring, even if you’re not yet familiar with the concepts above and you’re not sure how to get started.</p></blockquote>
<p><a href="https://markandruth.co.uk/2016/01/08/how-we-tweaked-postgres-upsert-performance-to-be-2-3-faster-than-mongodb" rel="noopener" target="_blank">How we tweaked Postgres upsert performance to be 2-3* faster than MongoDB</a></p>
<blockquote><p>As we all know, relational databases are fine if you’re dealing with small amounts of data but for web-scale high performance high inserts speed and masses of queries per second, NoSQL is what you need. At least, that’s the conventional wisdom/hype surrounding NoSQL databases such as MongoDB. However as we’ve recently discovered this is very wrong indeed.</p></blockquote>
<p><a href="https://info.varnish-software.com/blog/painful-varnish-mistakes" rel="noopener" target="_blank">Painful Varnish mistakes</a></p>
<blockquote><p>This post was initially titled "Top 6 Varnish mistakes", to echo Espen's blog. Even though his material is three years old, the content is still relevant. Plus, there's a healthy colleague competition going on here, and I can't just mimic Espen if I hope to beat him, so I had to do something different.</p></blockquote>
<p><a href="http://modern-sql.com/concept/null" rel="noopener" target="_blank">NULL in SQL: Indicating the Absence of Data</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://rafael.bernard-araujo.com/tropecando-79.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1247</post-id>	</item>
		<item>
		<title>Tropeçando 76</title>
		<link>https://rafael.bernard-araujo.com/tropecando-76.php</link>
					<comments>https://rafael.bernard-araujo.com/tropecando-76.php#respond</comments>
		
		<dc:creator><![CDATA[rafael]]></dc:creator>
		<pubDate>Fri, 17 Mar 2017 16:31:25 +0000</pubDate>
				<category><![CDATA[Tropeçando]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PostGreSQL]]></category>
		<category><![CDATA[ssh]]></category>
		<guid isPermaLink="false">https://rafael.bernard-araujo.com/?p=1223</guid>

					<description><![CDATA[Crie um proxy SOCKS em um servidor Linux com SSH para ignorar filtros de conteúdo O método mais rápido para melhorar o desempenho de qualquer Servidor de Aplicações Web PHP usando MySQL ou PostgreSQL Getting first and last values per group Every so often someone needs solution to getting first (or couple of first) values [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://imasters.com.br/infra/linux/crie-um-proxy-socks-em-um-servidor-linux-com-ssh-para-ignorar-filtros-de-conteudo/" target="_blank" rel="noopener">Crie um proxy SOCKS em um servidor Linux com SSH para ignorar filtros de conteúdo</a></p>
<p><a href="https://imasters.com.br/desenvolvimento/o-metodo-mais-rapido-para-melhorar-o-desempenho-de-qualquer-servidor-de-aplicacoes-web-php-usando-mysql-ou-postgresql/" target="_blank" rel="noopener">O método mais rápido para melhorar o desempenho de qualquer Servidor de Aplicações Web PHP usando MySQL ou PostgreSQL</a></p>
<p><a href="https://www.depesz.com/2017/02/20/getting-first-and-last-values-per-group/" target="_blank" rel="noopener">Getting first and last values per group</a></p>
<blockquote><p>Every so often someone needs solution to getting first (or couple of first) values for given column. Or last. For some cases (when there is not many groups) you can use recursive queries. But it's not always the best choice. Let's try to implement first() and last() aggregates, so these could be easily used by anybody.</p></blockquote>
<p><a href="https://github.com/kamranahmedse/developer-roadmap" target="_blank" rel="noopener">Roadmap to becoming a web developer in 2017</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://rafael.bernard-araujo.com/tropecando-76.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1223</post-id>	</item>
		<item>
		<title>Tropeçando 75</title>
		<link>https://rafael.bernard-araujo.com/tropecando-75.php</link>
					<comments>https://rafael.bernard-araujo.com/tropecando-75.php#respond</comments>
		
		<dc:creator><![CDATA[rafael]]></dc:creator>
		<pubDate>Mon, 06 Feb 2017 19:13:47 +0000</pubDate>
				<category><![CDATA[Tropeçando]]></category>
		<category><![CDATA[AngularJS]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[Banco de dados]]></category>
		<category><![CDATA[desenvolvimento]]></category>
		<category><![CDATA[infraestrutura]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Node.JS]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PostGreSQL]]></category>
		<category><![CDATA[shell]]></category>
		<guid isPermaLink="false">https://rafael.bernard-araujo.com/?p=1219</guid>

					<description><![CDATA[Promise Anti-patterns Promises are very simple once you get your head around them, but there are a few gotchas that can leave you with your head scratching. Here are a few that got me. PG Phriday: Why Postgres Generic HTTP Error Handling in AngularJS Lately during development at one of our clients, Ravello Systems, we [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="https://web.archive.org/web/20180216170651/http://taoofcode.net/promise-anti-patterns" target="_blank" rel="noopener">Promise Anti-patterns</a></p>
<blockquote><p>Promises are very simple once you get your head around them, but there are a few gotchas that can leave you with your head scratching. Here are a few that got me.</p></blockquote>
<p><a href="http://bonesmoses.org/2017/01/13/pg-phriday-why-postgres/" target="_blank" rel="noopener">PG Phriday: Why Postgres</a></p>
<p><a href="http://www.codelord.net/2014/06/25/generic-error-handling-in-angularjs/" target="_blank" rel="noopener">Generic HTTP Error Handling in AngularJS</a></p>
<blockquote><p>Lately during development at one of our clients, Ravello Systems, we decided we wanted better HTTP error handling.</p>
<p>Basically, our perfect solution would have generic handlers for errors, and most calls in the code will not have to do any special work for handling errors. This means that things like authentication problems, server unavailability issues, etc. will be handled in one place — like adding a generic “something went wrong” modal.</p></blockquote>
<p><a href="https://web.archive.org/web/20210920204600/https://www.phpclasses.org/blog/post/514-php-mysql-postgresql-performance-evaluating-and-tuning.html" target="_blank" rel="noopener">The Fastest Method to Evaluate Tune the Performance of Any PHP Web Application Server using MySQL or PostgreSQL</a></p>
<blockquote><p>In the Web development world, we often have the problem of choosing the right server to use in the production environment of a Web application.</p>
<p>Maybe we need to buy a new server to handle the expected load, or maybe the customer wants to deploy in an existing server.</p>
<p>In any case, if after deploying and running the application it will show poor performance, then we need to ask the team what we can do to make the application faster or use a better server.</p>
<p>Therefore we need to determine if the application is performing well. Read this article to learn how to quickly determine the performance of an application on the current server.</p></blockquote>
<p><a href="http://momjian.us/main/blogs/pgblog/2016.html#September_21_2016">Postgres 9.6 Features</a></p>
<blockquote><p>
PostgreSQL is now on version 16. Check the <a href="https://www.postgresql.org/docs/16/release-16-4.html">release notes</a>
</p></blockquote>
<p><a href="https://www.toptal.com/software/definitive-guide-to-datetime-manipulation" target="_blank" rel="noopener">The Definitive Guide to DateTime Manipulation</a></p>
<blockquote><p>As a software developer, you can’t run away from date manipulation. Almost every app a developer builds will have some component where date/time needs to be obtained from the user, stored in a database, and displayed back to the user.</p></blockquote>
<p><a href="https://darksideclouds.wordpress.com/2016/10/10/collect-exec-sh-my-personal-os-report/" target="_blank" rel="noopener">collect-exec.sh – My personal OS report</a></p>
<blockquote><p>The script collects a lot of information about the running system and save the output of each commands in a text file, and saves copies of important files in a directory named files. At the end of the script everything is compressed with tar in the global directory.</p></blockquote>
<p><a href="https://www.citusdata.com/blog/2016/10/12/count-performance/" target="_blank" rel="noopener">Faster PostgreSQL Counting</a></p>
<blockquote><p>Everybody counts, but not always quickly. This article is a close look into how PostgreSQL optimizes counting. If you know the tricks there are ways to count rows orders of magnitude faster than you do already.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://rafael.bernard-araujo.com/tropecando-75.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1219</post-id>	</item>
		<item>
		<title>Tropeçando 72</title>
		<link>https://rafael.bernard-araujo.com/tropecando-72.php</link>
					<comments>https://rafael.bernard-araujo.com/tropecando-72.php#respond</comments>
		
		<dc:creator><![CDATA[rafael]]></dc:creator>
		<pubDate>Thu, 11 Feb 2016 14:28:36 +0000</pubDate>
				<category><![CDATA[Tropeçando]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[PostGreSQL]]></category>
		<category><![CDATA[tuning]]></category>
		<guid isPermaLink="false">http://rafael.bernard-araujo.com/?p=1186</guid>

					<description><![CDATA[A simple JSON difference function A function that would take two JSONB objects in PostgreSQL, and return how the left-hand side differs from the right-hand side. Deadlocks in PostgreSQL Compreenda os tipos de lock existentes no PostgreSQL, como ocorre um deadlock e pesquisar o causador do lock. PG Phriday: COPY and Alternative Import Methods Alternativa [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://thebuild.com/blog/2016/01/21/a-simple-json-difference-function/" target="_blank" rel="noopener">A simple JSON difference function</a></p>
<blockquote><p>A function that would take two JSONB objects in PostgreSQL, and return how the left-hand side differs from the right-hand side.</p></blockquote>
<p><a href="http://raghavt.blogspot.com.br/2011/11/deadlocks-in-postgresql.html">Deadlocks in PostgreSQL </a></p>
<blockquote><p>Compreenda os tipos de lock existentes no PostgreSQL, como ocorre um deadlock e pesquisar o causador do lock.</p></blockquote>
<p><a href="http://bonesmoses.org/2016/01/29/pg-phriday-copy-and-alternative-import-methods/" target="_blank" rel="noopener">PG Phriday: COPY and Alternative Import Methods</a></p>
<blockquote><p>Alternativa para cópia de conteúdo de arquivos para o banco de dados.</p></blockquote>
<p><a href="http://thebuild.com/blog/2016/02/02/always-do-this-4-put-stats_temp_directory-on-a-memory-file-system/" target="_blank" rel="noopener">Always Do This #4: Put stats_temp_directory on a memory file system</a></p>
<blockquote>
<p>The PostgreSQL statistics collector generates a lot of very important statistics about the state of the database. If it’s not working, autovacuum doesn’t work, among other problems. But it does generate a lot of write activity, and by default, that goes back onto the database volume.</p>
<p>Instead, always set statstempdirectory to point to a RAM disk (which has to be owned by the postgres user, with 0600 permissions). The statistics are written back to the database on shutdown, so in normal operations, you won’t lose anything on a reboot. (You’ll lose the most recent statistics on a crash, but you will anyway; the statistics are reset on recovery operations, including restart from a crash.)</p>
<p>This can substantially cut down the amount of write I/O the main database storage volume has to receive, and it’s free!</p>
</blockquote>
<p><a href="http://hacksoclock.blogspot.com.br/2014/04/putting-statstempdirectory-on-ramdisk.html" target="_blank" rel="noopener">Putting stats_temp_directory on a ramdisk</a></p>
<blockquote><p>When statistics are not generated, we can have, among other problems, the halt of the autovacuum execution. As a consequence of the problems caused by the interruption of statistics collection, large spikes in writing activity end up occurring, which overloads server utilization. Changing the stat_temp_directory setting can prevent this.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://rafael.bernard-araujo.com/tropecando-72.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1186</post-id>	</item>
		<item>
		<title>Tropeçando 71</title>
		<link>https://rafael.bernard-araujo.com/tropecando-71.php</link>
					<comments>https://rafael.bernard-araujo.com/tropecando-71.php#respond</comments>
		
		<dc:creator><![CDATA[rafael]]></dc:creator>
		<pubDate>Wed, 20 Jan 2016 19:25:06 +0000</pubDate>
				<category><![CDATA[Tropeçando]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PostGreSQL]]></category>
		<category><![CDATA[segurança]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vpn]]></category>
		<guid isPermaLink="false">http://rafael.bernard-araujo.com/?p=1169</guid>

					<description><![CDATA[PG Phriday: Displaced Durability Há tabelas que possuem dados com os quais você não se importa de perdê-los. São situações de dados transientes, como áreas de dados passageiros, tabelas temporárias persistentes, tabelas com dados crus de importação. Por quê não aproveitar o fato do PostgreSQL oferecer a opção de ser UNLOGGED? Ainda mais porque pode-se [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://bonesmoses.org/2015/12/04/pg-phriday-displaced-durability/" target="_blank" rel="noopener noreferrer">PG Phriday: Displaced Durability</a></p>
<blockquote><p>Há tabelas que possuem dados com os quais você não se importa de perdê-los. São situações de dados transientes, como áreas de dados passageiros, tabelas temporárias persistentes, tabelas com dados crus de importação. Por quê não aproveitar o fato do PostgreSQL oferecer a opção de ser <span class="code">UNLOGGED</span>? Ainda mais porque pode-se evitar usar recursos do servidor desnecessariamente.</p></blockquote>
<p><a href="http://peter.eisentraut.org/blog/2015/12/07/check-your-pg-dump-compression-levels" target="_blank" rel="noopener noreferrer">Check your pg_dump compression levels</a></p>
<blockquote><p>Ao realizar backups do banco PostgreSQL, há muitas situações em que encontramos uma sobrecarga inesperada e o nível de compressão escolhido para fazer o backup pode ter ação direta sobre isso. Como a compressão nem sempre é tão importante, não esquecer este detalhe pode poupar incômodos desnecessários em operações de backup que não as rotineiras.</p></blockquote>
<p><a href="https://web.archive.org/web/20160517185740/http://techarena51.com:80/index.php/how-to-install-an-opensource-vpn-server-on-linux/" target="_blank" rel="noopener noreferrer">How to install an Opensource VPN Server on Linux</a></p>
<blockquote><p>Instalação de VPN própria para assegurar o controle do tráfego em conexões.</p></blockquote>
<p><a href="http://www.phpit.com.br/artigos/filtrando-e-validando-dados-no-php-com-filter_var.phpit" target="_blank" rel="noopener noreferrer">Filtrando e validando dados no PHP com filter_var()</a></p>
<blockquote><p>Entrada de dados é uma característica de quase a totalidade dos sistema ou sites. É indispensável, para segurança dos dados, filtrar esta entrada a fim de evitar invasões, roubo de dados ou inconsistência. No PHP, aprenda a fazer isso usando filter_var().</p></blockquote>
<p><a href="http://www.edivaldobrito.com.br/como-instalar-o-ffmpeg-no-ubuntu/" target="_blank" rel="noopener noreferrer">FFmpeg no Ubuntu: veja como instalar esse pacote no 14.04/14.10 via repositório</a></p>
<p><a href="https://web.archive.org/web/20160617002820/http://savepoint.blog.br/trabalhando-com-logs-no-postgresql/" target="_blank" rel="noopener noreferrer">Trabalhando com logs no PostgreSQL</a></p>
<blockquote><p>Dicas de configurações de log em servidores PostgreSQL. As informações contidas em logs são essenciais em muitos problemas e importantes para a saúde da aplicação e do sistema de banco de dados.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://rafael.bernard-araujo.com/tropecando-71.php/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1169</post-id>	</item>
	</channel>
</rss>
