<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Prima Adi on Medium]]></title>
        <description><![CDATA[Stories by Prima Adi on Medium]]></description>
        <link>https://medium.com/@primaadipradana?source=rss-b90f776c3fc7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*P03LTRXKWisCy-x4AStx3g.png</url>
            <title>Stories by Prima Adi on Medium</title>
            <link>https://medium.com/@primaadipradana?source=rss-b90f776c3fc7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 11:46:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@primaadipradana/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[History Of Pain, What we learn about Traefik]]></title>
            <link>https://medium.com/@primaadipradana/history-of-pain-what-we-learn-about-traefik-7ef3de776ae9?source=rss-b90f776c3fc7------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ef3de776ae9</guid>
            <category><![CDATA[reverse-proxy]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[journey]]></category>
            <category><![CDATA[traefik]]></category>
            <dc:creator><![CDATA[Prima Adi]]></dc:creator>
            <pubDate>Fri, 25 Jan 2019 04:15:52 GMT</pubDate>
            <atom:updated>2019-01-25T04:15:52.230Z</atom:updated>
            <content:encoded><![CDATA[<p>This is just story about our journey from don’t know anything about the tool to actually use a tool. And how we end up hurt and fell pain debuging new tools that we don’t know so much about it, and switch back to the old and mature things that could full fill our desire. i’m not recommend you to choose the old one. Sometimes young and bold is better but sometimes its not. The best is understand your problem and use the right tools.</p><blockquote>Note : All things works well when our team using nginx but we hungry for works so we search for alternatives even it means pain, kidding. actually we need reverse proxy that handle configuration easily and include forward auth (in this time we don’t know that nginx have auth_request module).</blockquote><p>This story start when our beloved leader start random-ing about tools for our future platform and system. he is smart human with little bit hype driven development inside his mind, Sorry i’m kidding. Its base of our discussion and a lot of consideration we decide to use <em>traefik</em> for all our tools gateway. all dashboard and tools will go through traefik and serve it to backend.</p><p>I’m starting to try and taste <em>traefik</em> how it’s work and how easy the configuration is. you could combine <em>traefik</em> with its provider and one of the provider is key value <em>consul</em> or <em>etcd</em>. Thats really awesome. no need use consul-template like when we use <em>nginx</em>.</p><p>ok but first</p><h3>What is Traefik</h3><p>From <a href="https://traefik.io/">traefik website</a>, Traefik is a reverse proxy / load balancer that’s easy, dynamic, automatic, fast, full-featured, open source, production proven, provides metrics, and integrates with every major cluster technology. and they added <strong>No wonder it’s so popular! </strong>yay. for easy understand actually is nginx refound. with better in some way.<br>All is good. traefik have nice dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BdzqBbVGFMfbWszQfKGPEw.png" /><figcaption>Traefik dashboard nice isn’t it?</figcaption></figure><p>We could see even the health status how much http status thats comes in</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9GH3RVksayVy2XWY2P6cHw.png" /></figure><p>In that time i said to myself, this is it! the tool that we waiting for in long time.<br>nothing could satisfy us like traefik does.</p><p>In first phase our traefik is read configuration from etcd3. We hope we could change config easy and dynamically but it turns out that traefik and etcd3 is not match up. they dont get along that well. there is some the problem</p><ul><li>some times we should restrat traefik after change value in etcd.</li><li>in some reason etcd is dead and lost of their keys in dashboard (its ui problem).</li><li>we should deploy again with other prefix to make it works again.</li><li>etcd ui not good enough so its hard to insert config.</li></ul><p>for all above our purpose of using traefik and etcd not meet (<em>could change config easy and dynamically</em>)<br>after discuss again about the problem, we decide to using consul for key-value store traefik. This couple have good progress and chemistry, we could start seeing result.</p><ul><li>consul works well with traefik.</li><li>traefik could read config from consul and make immediate change dynamically.</li><li>we try out some backend and frontend. frontend rule, weight in url etc.</li><li>we start to re route our subdomain to our traefik</li></ul><p>Ther is some documentation about traefik and kv store <a href="https://docs.traefik.io/user-guide/kv-config/#key-value-storage-structure">here</a></p><p>In phase two i try to sore all config in consul, in phase one the global config still stored in file. so i use <a href="https://docs.traefik.io/user-guide/kv-config/#store-configuration-in-key-value-store">storeconfig</a> feature to store file config to key-value store and restart traefik with --consul --consul.endpoint=host:8500 .<br>and <strong>Boom</strong> its work smoothly.</p><p>Its works now and our jobs is done . . . . . . . . . . . for a while.</p><h3>Problem Start Rampaging</h3><p>After couple days. our team members asking about his streaming log is timeout and not fully loaded because is go through <em>traefik</em>. its ok when streaming directly to pods ip. I change something about idle timeout and its hard to test it, need a lot of work to just test it. so we leave it that way.</p><p>After 2 days the problem still exist and we found that actually <em>traefik</em> don’t support streaming if compressed true. (default http client in <a href="https://golang.org/">golang</a>). and then problem and issue links start coming</p><ul><li>text/event-stream + compress=true not working <a href="https://github.com/containous/traefik/issues/2576">https://github.com/containous/traefik/issues/2576</a></li><li>some key in consul not parsed <a href="https://github.com/containous/traefik/search?p=1&amp;q=%2Atypes.ResponseForwarding&amp;unscoped_q=%2Atypes.ResponseForwarding">(see this code)</a>. its already merged PR for this bug but not released yet <a href="https://github.com/containous/traefik/pull/4112/files">github pr</a></li></ul><p>just those 2 problem make us wonder is traefik really good for us?<br>and we start thinking to cheat from traefik and come back to our ex-tools <em>nginx.</em></p><p>is she would be mad if we cheat on her?. we don’t really care because we have a dead line.</p><h3>What we learn</h3><ul><li>traefik is a great reverse proxy but not as mature as nginx.</li><li>worth trying if we do not use event stream and flushing mechanism.</li><li>traefik have good dynamic config with kv store no need extra work.</li><li>don’t always trust yourself.</li><li>new is not aways good. but old is not too. So, all tools is good for their field and specialization.</li></ul><blockquote>This writing is not about what is better, its about how we define our problem and match it with the tools available.</blockquote><p>Thanks to <a href="https://traefik.io/">Traefik</a> and <a href="https://nginx.org/">Nginx</a> for make our live easier.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ef3de776ae9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Bash Script and Aliases Could Make Your Life Easier]]></title>
            <link>https://medium.com/@primaadipradana/how-bash-script-and-aliases-could-make-your-life-easier-c188a7c0ec?source=rss-b90f776c3fc7------2</link>
            <guid isPermaLink="false">https://medium.com/p/c188a7c0ec</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[tips-and-tricks]]></category>
            <category><![CDATA[bash-script]]></category>
            <category><![CDATA[bash]]></category>
            <dc:creator><![CDATA[Prima Adi]]></dc:creator>
            <pubDate>Fri, 27 Jul 2018 03:38:20 GMT</pubDate>
            <atom:updated>2018-07-27T03:58:21.831Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AP9H_CRf5qq7Aw4qDhYPhg.png" /></figure><p>This is story about developer who start in old PHP world where we use mixed <em>php+html+inline css</em> and deploy to shared hosting via FTP (All GUI). Using rename folder for versioning. Once enter terminal and don’t know what was that black screen, and when accidentally edit file with vim and end up by restarting computer. That’s the time where i was living.</p><p>Now, i’m accidentally a backend human who always in front of black screen monitor, either its learning something, code a script or just watch and filter logs (mostly still manual).</p><p><strong>How Bash Script Help Me</strong></p><p>I still don’t know much about it but at least this one language could help me in my productivity. Bash have its own way in its syntax. and its literally execute cli command like if you have to start many service to start a project you could just create bash script and run it once.</p><p>this is example for startlemp.sh.</p><pre>#!/bin/bash</pre><pre>sudo service php7.0-fpm start<br>sudo service mysql-server start<br>sudo service nginx start</pre><p>and combine it with alias to your .profile file.</p><pre>alias lemp=&quot;sh ~/.startlemp.sh&quot;</pre><p>now you could open computer in the morning little youtube for a while and when you want to start your project just open terminal and type :</p><pre>$lemp</pre><p>For someone that have huge WPM will have no problem with type all of that in second, or someone with high end computer will make those <em>lemp</em> stack in startup so they will alive when computer start. But for someone with little WPM, lazy, and don’t have great spec in computer will really helped by bash script.</p><blockquote>don’t compare with docker. Its about the bash :D and back there docker is not hype yet.</blockquote><p><strong>Bash help me enter SSH with the flag</strong></p><p>how to create variable with bash? you could use :</p><pre>var1=&quot;is var one&quot;<br>echo $var1</pre><p>and now i want to type ss back will go to my backend server without type the ip over and over, I will use something like this file .myssh.sh .</p><pre>#!/bin/bash</pre><pre>if [ &quot;$1&quot; = &quot;back&quot; ]; then<br>        server=&quot;user-backend@11.11.11.11&quot;<br>elif [ &quot;$1&quot; = &quot;front&quot; ]; then<br>        server=&quot;user-frontend@22.22.22.22&quot;<br>else<br>        echo &quot;server side required&quot;<br>        exit 1<br>fi</pre><pre>echo &quot;will execute&quot;<br>echo &quot;ssh $server&quot;<br>ssh &quot;$sshcommand&quot;</pre><p>and once gain combine it with alias.</p><pre>alias ss=&quot;sh ~/.myssh.sh&quot;</pre><p>now for running that script just type :</p><p>- ss back to ssh to backend server.</p><p>- ss front to ssh to front end server.</p><p>To be able to ssh to server i want with just two word was awesome. Up until now bash and aliases help me a lot. hope this article, bash, and aliases will help you too.</p><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c188a7c0ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stress test CPU and Memory in Linux]]></title>
            <link>https://medium.com/@primaadipradana/stress-test-cpu-and-memory-in-linux-d17bfa5e8887?source=rss-b90f776c3fc7------2</link>
            <guid isPermaLink="false">https://medium.com/p/d17bfa5e8887</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[stress-testing]]></category>
            <category><![CDATA[cpu]]></category>
            <category><![CDATA[rams]]></category>
            <category><![CDATA[software]]></category>
            <dc:creator><![CDATA[Prima Adi]]></dc:creator>
            <pubDate>Tue, 24 Jul 2018 06:54:19 GMT</pubDate>
            <atom:updated>2018-07-27T03:57:59.998Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tc_gVessNzY89cC9VYHOzQ.png" /></figure><p>Have heard chaos-duck ? no? ok.<br>That’s the name of the script that will destroy and disrupt an stable system. its license by company where i work.</p><p><strong>Why disrupt stable system?</strong></p><p>Some stable platform need this kind of script to simulate disaster and apply mitigation before the real disaster coming. so yes i create some script . . with disaster level like in the (<a href="https://www.imdb.com/title/tt4508902/">one punch man</a>). stop that and stop this and i was confuse how do i make CPU or RAM peak.</p><p>in the next day i was alone staring the blue sky and i wonder how could i make cpu machine 100% so some guy in the internet told me (<a href="http://google.com/">search google</a>) i could use <a href="http://manpages.ubuntu.com/manpages/bionic/en/man1/stress.1.html">stress</a> tool.</p><p>how to install it? just do :</p><pre>sudo apt-get install stress</pre><p><strong>Stress test to CPU</strong></p><p>For doing stress test to cpu we need to know how much cpu in our machine so i could get that with :</p><pre>grep -c ^processor /proc/cpuinfo</pre><p>and do the stress test (example with 2 core) and stress test will be done in 120 second.</p><pre>stress --cpu 2 --timeout 120</pre><p><strong>Stress test to RAM</strong></p><p>to stress test memory we need to define how much we will fill up memory and how much is it. if you have 4Gb ram you could fill up 1024M * 4 it will be :</p><pre>stress --vm 4 --vm-bytes 1024M</pre><p><strong>Stress test could also test IO</strong></p><p>i have not try this but the command should be</p><pre>stress --io 4</pre><p>thats it you could simulate the disaster to your <em>app</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K-P5WofP8n26mOBSGxoOOA.png" /><figcaption><a href="http://devhumor.com/media/software-terminology">devhumor</a></figcaption></figure><p>You could destroy your own computer too. with combine all command</p><pre>stress --cpu 2 --io 4 --vm 2--vm-bytes 1024M --timeout 300s</pre><p>hope this will help you who have a task to test your system<br>thank you</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d17bfa5e8887" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unique way of learning english, and why you should try it.]]></title>
            <link>https://medium.com/@primaadipradana/unique-way-of-learning-english-and-why-you-should-try-it-dfb35d046ad1?source=rss-b90f776c3fc7------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfb35d046ad1</guid>
            <category><![CDATA[language-learning]]></category>
            <category><![CDATA[english-language]]></category>
            <category><![CDATA[bahasa-indonesia]]></category>
            <category><![CDATA[indonesian]]></category>
            <category><![CDATA[tips-and-tricks]]></category>
            <dc:creator><![CDATA[Prima Adi]]></dc:creator>
            <pubDate>Fri, 13 Jul 2018 16:32:19 GMT</pubDate>
            <atom:updated>2018-07-27T04:09:45.217Z</atom:updated>
            <content:encoded><![CDATA[<p>This is my first story in medium and this idea is just walk through my head, “<em>Unique way of learning english ? and why you should try it?”</em>. it will talk a lot about me. so bare with me.</p><p><strong>why this is so special?</strong></p><blockquote>yeah this is part of my way try to blend in global communication system (i don’t even know that terms exists) and this is my first time writing internet content in english.</blockquote><p>for me this article is my dream my first step to proof myself that learning is never stop and it will pay off. and yes because this is my first time you will see many bad grammar in this story, sorry for that first.</p><p>why i write in english?, of course the first step is to learning. this is like you want to eat something but you never cook it or buy it just stare at it never make you eat it. write it will give you more knowledge of the language.</p><p>In my community there is a time when watching a movie without subtitle and understand the film is <em>super human</em>. sharing is one of my reason to write in english. write in local language the reader is just your country right?, so i want to share to the world that there is some one in the world that struggling to learn english. thats me.</p><p><strong>The way of learning english</strong></p><p>i live in Indonesia in 90’s, birth of <em>millenials </em>and the rise of technology. i was so bad in english and i hate it, until i feel like i will be the stupidest student in english. I still remember my english teacher when i was in middle school, she was pointing hand to me and say “the boy in the corner stand up please”, she wanted me and my friend to stand up that was so scary, like the world fall a part, just standup until the class end, thats it.</p><p>I’m not scared with the teacher but i’m afraid when the teacher ask me something and i don’t even understand what the question, feel me?. I was scared with the language. Live goes on and there is a time when i realize that english is so important. so i try to learn in collage (its hard but its a must).</p><p>first step when you want to learn english is.</p><p><strong>You want it.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VwImcY4brI92KPS4kD9xgw.png" /><figcaption>image by <a href="https://www.pexels.com/photo/silhouette-of-child-looking-on-window-blinds-1212826/">Johan Bos</a></figcaption></figure><p>this is the first step its called <em>niat</em> in <em>Bahasa. niat </em>is statement that you will or you want to do some thing <em>“i will learn english”</em> say that to yourself and include god in that. it will give you strong will to do it. its apply in any thing you do in live.</p><p><strong>Watch <em>japanese</em> serial with english subtitle.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W46FsJ3yQQqFfBxmVMg03Q.png" /><figcaption>image by <a href="https://pixabay.com/id/anime-angka-tokoh-anime-manga-1610875/">kirrahoffmann</a></figcaption></figure><p>this will force you to learn it, the language is <em>japanese</em> but subtitle is english, mean while you speak <em>Bahasa</em>. when i was in college i watch <em>one piece</em> a lot with english subtitle. never use <em>Bahasa</em> subtitle. and that was 500 episodes of that.</p><p><strong>pause and play when watch a movie</strong></p><p>When watching a movie on <a href="https://www.netflix.com/id/">netflix</a> or <a href="https://www.iflix.com/">iflix</a> don’t use the subtitle just pause and play to understand the story. it will force you to know what the actors say. even me until know sometimes still pause a movie and rewind so i could understand what the actors say, to learn english.</p><p><strong>read many english article</strong></p><p>When i was in college i still hated english and thats hold me to learn more about my degree. I studied computer science and i hate english so bad, while all tutorials and programming book written in english. one day i sat with my friends and say to one of them “<em>koe kok pinter banget koding sih</em>” (why you so good in programing) i still remember that my friend told me “if you want to be expert in programming learn english first”, that statement hits me. and from that time i start to suffering reading programming language tutorials in english, yes i learn to knowledge in one book. english and the programming language.</p><p>thats is hope you enjoy it. i feel wrong about this article because i want to share trick to learn english but i write it in english. wkwk so who would read it, but whatever.</p><p>if you see bad grammar in this story please tell me. it will helps me as a learner. thanks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfb35d046ad1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>