Skip to content

Commit

Permalink
Deploy 2023-10-31 20:46:19-03:00
Browse files Browse the repository at this point in the history
  • Loading branch information
mzahnd committed Oct 31, 2023
1 parent 145743d commit f8d8146
Show file tree
Hide file tree
Showing 6 changed files with 339 additions and 49 deletions.
302 changes: 302 additions & 0 deletions blog/2023/10/10/fast.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,302 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="icon" type="image/png" href="/favicon.png">

<title>fast - Martín's blog</title>


<!--
Included files have their own css, js files and will not be
appear here.
-->

<!-- ====== CSS Files ====== -->
<link rel="stylesheet" href="/css/site-top-bar.css">
<link rel="stylesheet" href="/css/site-footer.css">
<link rel="stylesheet" href="/css/site-menu.css">


<link rel="stylesheet" href="/css/syntax.css">

<link rel="stylesheet" href="/css/blog/post.css">


<!-- ====== END CSS Files ====== -->

<!-- ====== JS Files ====== -->
<script type="text/javascript" src="/js/common.js"></script>
<script type="text/javascript" src="/js/site-menu.js"></script>
<script type="text/javascript" src="/js/site-top-bar.js"></script>



<!-- ====== END JS Files ====== -->

<!-- ====== Font Awesome ====== -->
<script src="https://kit.fontawesome.com/0cfe53209a.js" crossorigin="anonymous">
</script>
<!-- ====== END Font Awesome ====== -->



<!-- ====== SEO ====== -->
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>fast | Martín’s blog</title>
<meta name="generator" content="Jekyll v4.2.1">
<meta property="og:title" content="fast">
<meta name="author" content="Martín E. Zahnd">
<meta property="og:locale" content="en_US">
<meta name="description" content="If your service is slow, you’re in trouble.">
<meta property="og:description" content="If your service is slow, you’re in trouble.">
<link rel="canonical" href="https://mzahnd.github.io/blog/2023/10/10/fast.html">
<meta property="og:url" content="https://mzahnd.github.io/blog/2023/10/10/fast.html">
<meta property="og:site_name" content="Martín’s blog">
<meta property="og:type" content="article">
<meta property="article:published_time" content="2023-10-10T22:57:00-03:00">
<meta name="twitter:card" content="summary">
<meta property="twitter:title" content="fast">
<meta name="google-site-verification" content="CT3cmVw_OhpKeDjTSMDoO9zCxnArTWa8PcyuM0xfozs">
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"Martín E. Zahnd"},"dateModified":"2023-10-10T22:57:00-03:00","datePublished":"2023-10-10T22:57:00-03:00","description":"If your service is slow, you’re in trouble.","headline":"fast","mainEntityOfPage":{"@type":"WebPage","@id":"https://mzahnd.github.io/blog/2023/10/10/fast.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://mzahnd.github.io/assets/logo.png"},"name":"Martín E. Zahnd"},"url":"https://mzahnd.github.io/blog/2023/10/10/fast.html"}</script>
<!-- End Jekyll SEO tag -->

<!-- ====== End SEO ====== -->
</head>
<body>




<div class="site-menu--container" id="site-main-menu">

<button aria-label="Close menu" title="Close menu" class="btn" id="btn-site-main-menu-close">
<i class="fas fa-times"></i>
</button>
<div class="menu-content">
<img src="/assets/logo.png" class="logo" alt="Martín's blog" loading="lazy">

<div class="flex-separator"></div>

<ul class="menu-list">

<li>
<a href="/" alt="Home" class="btn btn-link">
Home
</a>
</li>

<li>
<a href="/blog" alt="Blog" class="btn btn-link">
Blog
</a>
</li>

<li>
<a href="/notes" alt="Notes" class="btn btn-link">
Notes
</a>
</li>

</ul>

<div class="flex-separator"></div>

<ul class="menu-info-list">

<li>
<a href="/about.html" alt="About" class="btn btn-link">
About
</a>
</li>

<li>
<a href="/contact.html" alt="Contact" class="btn btn-link">
Contact
</a>
</li>

</ul>

<div class="flex-separator"></div>

<div class="accessibility-opts">
<p>Current font size:
<span id="accessibility-font-size-label">0 pt</span>
</p>
<ul>
<li>
<button aria-label="Restore font size" title="Restore font size" type="button" class="btn" id="accessibility-zoom-reset">
<i class="fas fa-undo-alt"></i>
</button>
</li>
<li>
<button aria-label="Decrease font size" title="Decrease font size" type="button" class="btn" id="accessibility-zoom-m">
<i class="fas fa-minus"></i>
</button>
</li>
<li>
<button aria-label="Increase font size" title="Increase font size" type="button" class="btn" id="accessibility-zoom-p">
<i class="fas fa-plus"></i>
</button>
</li>
</ul>
</div>

<div class="flex-separator"></div>
</div>
</div>


<div id="container-page">



<header class="site-top-bar">
<div class="top-bar--container" id="top-bar">
<button aria-label="Menu button" title="Menu button" type="button" class="top-bar-btn" id="btn-toggle-menu">
<i class="fas fa-bars"></i>
</button>
<div class="top-bar-separator"></div>
<div class="top-bar-logo">
<a href="/" alt="Martín's blog">
<h1>Martín's blog</h1>
<img class="logo" src="/assets/logo.png" alt="Martín's blog" loading="eager">
</a>
</div>
<div class="top-bar-separator"></div>
</div>
</header>


<div class="page-content">






<div class="post-content">





<header>
<h1 id="post-title">fast</h1>
<p id="post-author">Written by Martín E. Zahnd</p>

<p id="post-date">Published: 2023-10-10 22:57</p>


<p id="post-tags">Tags:

programming,

architecture

</p>

<br>

<div class="post-excerpt">
<p>If your service is slow, you’re in trouble.</p>


</div>
</header>

<ul id="toc" class="section-nav">
<li class="toc-entry toc-h2"><a href="#slow">Slow</a></li>
<li class="toc-entry toc-h2"><a href="#is-this-important-at-all">Is this important at all?</a></li>
<li class="toc-entry toc-h2"><a href="#what-should-we-do-then">What should we do then?</a></li>
</ul>






<article>
<div class="post-content">


<h2 id="slow">Slow</h2>

<p>I’ve been working on a project with a slow backed, a really slow one.
Sometimes it took 30 seconds to retrieve data <sup id="fnref:cached-retrieval" role="doc-noteref"><a href="#fn:cached-retrieval" class="footnote" rel="footnote">1</a></sup>, which represents 3
timeouts for the server. So, in practice, it took more than 30 seconds to some things, or worse:
asking the user to “push the button” four times.
Oh, and, when I started working on this project, the app didn’t handle timeouts, which is also very
important. It does now, fortunately.

</p>
<p>This is my “first hand experience” from a technical perspective in this matter.</p>

<h2 id="is-this-important-at-all">Is this important at all?</h2>

<p>Technically, no that much. <em>Just click it again and it works</em>.
But systems exist provide value to other people, call it entertainment or helping them achieve
something easily, but the mean is the same: <em>do something for someone</em>.
As such, they are always in contact with us (humans) and we don’t really like waiting 30 seconds.
Not in anything tech related, at least.
This leads to angry clients, that is, people who don’t like waiting or <em>clicking it again</em>
<sup id="fnref:click-it-again" role="doc-noteref"><a href="#fn:click-it-again" class="footnote" rel="footnote">2</a></sup>, and angry clients lead to less revenue.</p>

<p>That’s no secret, but I’ve seen a few small projects and big corps too not caring at all about this.</p>

<h2 id="what-should-we-do-then">What should we do then?</h2>

<p>First of all, handle timeouts.</p>

<p>They do exist, and they are not always your servers fault: maybe the user went inside an
underground parking and lost signal, maybe he or she is in a rural area without proper internet
access, who knows!
But we know that “client code” is always harder to deploy and debug than “server code”, especially
in mobile devices, because they depend on the user (or the operating system, for that matter)
updating your app.</p>

<p>Second, take your time to analyze each request in your server and try to detect your services
bottlenecks.</p>

<p>And finally, invest in a better server or cloud infrastructure if needed.
For example, if your requests “were fine” but your startup just got a lot of attention and suddenly
you’re serving request to 10x more clients, don’t try to limit your number of instances just to save
some money.
Better keep your old and new clients happy (by serving them fasts requests) and start working on
reducing your system’s bottlenecks as much as possible in the meantime.</p>
<div class="footnotes" role="doc-endnotes">
<ol>
<li id="fn:cached-retrieval" role="doc-endnote">
<p>The same data was retrieved in 1 to 3 seconds when cached, and that’s still painfully slow for a 100 KiB JSON. <a href="#fnref:cached-retrieval" class="reversefootnote" role="doc-backlink"></a></p>
</li>
<li id="fn:click-it-again" role="doc-endnote">
<p>I’ve notice that many users show resistance to <em>clicking again</em> a button. The expect it to work and show a message saying “Yeap. It worked.”. <a href="#fnref:click-it-again" class="reversefootnote" role="doc-backlink"></a></p>
</li>
</ol>
</div>

</div>
</article>
</div>
</div>

<div class="flex-separator"></div>



<footer class="site-footer">
<div class="site-footer--container">
<p>
Created by Martín E. Zahnd
<i class="far fa-copyright"></i>
2023
</p>
</div>
</footer>
</div>
</body>
</html>
22 changes: 22 additions & 0 deletions blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,28 @@ <h1>Martín's blog</h1>
<h1 class="publication-title">Blog</h1>
<ul>

<li>
<h1><a href="/blog/2023/10/10/fast.html">fast</a></h1>
<p id="post-date">Published: 2023-10-10 22:57:00 -0300</p>

<p id="post-tags">Tags:

programming,

architecture

</p>

<details>
<summary>Brief</summary>
<p>If your service is slow, you’re in trouble.</p>


<a href="/blog/2023/10/10/fast.html">Keep reading...</a>
</details>

</li>

<li>
<h1><a href="/blog/2022/08/28/ITBA_Drive_Migration.html">Migrando 1.3 TiB de datos en Google Drive</a></h1>
<p id="post-date">Published: 2022-08-28 09:34:38 -0300</p>
Expand Down
Loading

0 comments on commit f8d8146

Please sign in to comment.