<?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 Ivan Vanderbyl on Medium]]></title>
        <description><![CDATA[Stories by Ivan Vanderbyl on Medium]]></description>
        <link>https://medium.com/@ivanderbyl?source=rss-9666baf5e16a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nU01XZo8EcFyybZegUNCDg.jpeg</url>
            <title>Stories by Ivan Vanderbyl on Medium</title>
            <link>https://medium.com/@ivanderbyl?source=rss-9666baf5e16a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 14:21:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ivanderbyl/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[The State Of Open Source Testing survey results, 2020 edition]]></title>
            <link>https://medium.com/open-source-testing/the-state-of-open-source-testing-survey-results-2020-edition-3782b5864fcc?source=rss-9666baf5e16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3782b5864fcc</guid>
            <category><![CDATA[load-testing]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[testing-tools]]></category>
            <dc:creator><![CDATA[Ivan Vanderbyl]]></dc:creator>
            <pubDate>Wed, 27 May 2020 14:40:51 GMT</pubDate>
            <atom:updated>2020-05-27T14:40:51.211Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*8izsqCTpJgXPxxVl.png" /></figure><p>Tricentis, in collaboration with <a href="https://flood.io/">Flood</a>, <a href="https://specflow.org/">SpecFlow</a>, and <a href="https://testproject.io/">TestProject</a>, conducted our annual State Of Open Source survey, with nearly 2,000 responses.</p><p>In this post, we’ll explore the findings relating to performance and load testing for 2020.</p><p>Our biggest surprises this year were the combination of load-testing and continuous integration, which has seen a considerable increase from previous years and the consensus that it was a more niche workflow.</p><p>Not so much of a surprise, the continued adoption of open-source tools across organizations of all sizes, including large enterprises that have historically shunned open source products due to existing commercial vendor agreements. However, as we’ll see, security and training remain as roadblocks for around a sixth of companies surveyed.</p><p>In terms of geographies and demographics, Asia is leading the adoption of open-source testing tools, making up 61%. With Europe leading the western market at 16%, the United States at 14%, and Australia trailing at 3%.</p><p>India and Vietnam are growing faster than any other region, and I expect we’ll see substantial growth here in the coming years.</p><p>The main questions we want to answer from this survey are: is the role of performance testing changing? And is s open-source testing here for the long haul?</p><h3>Major roles in testing</h3><p>It comes as no surprise that QA teams are still responsible for about half of testing. At the same time, engineers do the remainder with broad functional responsibilities across operations, development, security, and performance.</p><p>We’ve seen a steady increase in our customers’ technical skills over the last 5 years due to the technical nature of load testing. Still, we’re now seeing this spread into broader testing disciplines, driven by the adoption of open-source tools.</p><p>Additionally, 33% of companies surveyed had specifically tasked performance engineers or teams that conduct performance tests regularly, which means QA is doing slightly less load testing overall than specialized teams.</p><p>And yet, around 10% of companies surveyed said that nobody was explicitly responsible for load testing.</p><h3>Experience Level</h3><p>Due to the rise of automated testing over the last 20 years, we haven’t seen any breakout group in terms of years of experience.</p><p>There is perhaps a slight increase in the number of people who started in the field around 2010 to 2015-those who now have 5–10 years under the belt.</p><h3>Top programming languages</h3><p>If you’re not doing model-based testing, you’re likely writing tests in some form of programming language.</p><p>No surprises that Java is still the most popular choice, no doubt driven by Selenium/TestNG. On the other hand, 40% of customers use JavaScript, which compares well with the adoption of JavaScript in all fields, not just testing or web apps.</p><blockquote>“Any application that <em>can </em>be written in JavaScript, <em>will</em> eventually be written in JavaScript.” — Jeff Atwood, Cofounder of StackOverflow</blockquote><h3>Biggest Roadblocks to Adoption</h3><p>While a wide range of organizations have adopted open-source tools, they still face roadblocks in some enterprises.</p><p>We’ll break these down as Support &amp; Training, Security, and Technical Capabilities.</p><p><strong>Support and Training<br></strong>Support and training remain a roadblock for adoption across all open-source projects, with very few investing the time required to write proper documentation, tutorials, and training material. This is a critical challenge is training your team when adopting a new tool.</p><p>For open-source, this has spawned multiple companies that focus specifically on supporting the implementation of open-source testing tools within organizations that would usually get training directly from a vendor.</p><p>Another risk is how often a project is updated, as most open-source projects don’t follow regular release cadence, or provide an easy upgrade path between major versions — a challenge with all software, whether you pay for it or not.</p><p>As more and more testing tools move to the cloud, updates are becoming a thing of the past.</p><p><strong>Security<br></strong>Interestingly, 15% of organizations still say that security and perceived vulnerabilities are a roadblock. However, when you talk to security experts, they say open source provides greater assurance of security because it increases the pool of eyes looking for vulnerabilities.</p><p>However, the ability of maintainers to implement fixes can increase security or leave projects open to exploitation. But at least the vulnerabilities are known.</p><p>In recent years an entire ecosystem of code analysis tools has been developed, which help automate the discovery and repair of vulnerabilities in open source projects, so it will be interesting to see how security trends as a concern next year.</p><p><strong>Technical Capabilities<br></strong>Support for more esoteric protocols within a chosen tool, setting up a test environment, maintaining test scripts, and managing test data were all viewed as technical impediments to regularly conducting performance tests.</p><p>Testing systems built on SAP or Citrix that don’t expose accessible testing interfaces, compound the problems faced by open-source tools in the enterprise.</p><p>With SAP, organizations spend millions on the software and the internal adoption, but finally, the transformation from one legacy system to something a few generations newer.</p><p>The CEO of one of the world’s largest pharmaceutical companies once said it would be a competitive advantage to implement SAP for less money and time than their competitors.</p><p>These types of enterprises are still the holdout for open-source adoption.</p><h3>Biggest Benefits</h3><p>While 16% of customers identified customer support as a roadblock, a similarly sized cohort prefers the community-based support offered by open-source tools.</p><p>The number one driver of open-source adoption is still cost, which is no surprise as commercial testing tools have historically run into the hundreds of thousands of dollars before training and professional services. Organizations can quickly make a significant saving on their QA effort by adopting open-source in the current climate.</p><p>Performance testing tools have a more storied history than a lot of modern QA testing tools, which is why performance testers view cost as less of a motivator for adoption then technical capabilities.</p><p>Lastly, freedom from vendor lock-in and ease of customization is still a strong driver for most surveyed companies.</p><h3>The role of load testing</h3><p>Automated testing has well and truly unseated manual testing, and load testing makes up nearly a third of testing overall.</p><p>At Flood, we’ve seen a strong trend to browser-based load testing in the last two years, as it now makes up 35% of all tests run on Flood. As a result of this, we hired three more engineers for the Element Core Team this year.</p><p>An interesting finding we’re seeing is that performance testing has moved from a reactive to proactive testing discipline, with nearly two-thirds of customers conducting performance tests within a typical sprint cycle.</p><p>Thanks to easy integrations between Flood and most Continuous Deployment services, you can easily add load testing into your release process to prevent regressions that could catch you in production.</p><h3>Tooling</h3><p>For performance testers, open-source tooling is critical to the job, which shows a significant move away from vendor apps of the past decades.</p><p>JMeter is still the most popular, with a little over half the market. The developer-focused tools such as Element, K6, Locust, and Gatling have seen an increase in adoption and now make up most of the backfield.</p><h3>Final thoughts</h3><p>Is the role of performance testing changing? I think there is strong evidence that more generalists are conducting performance testing in development teams.</p><p>It is clear to say open-source testing here for the long haul, as we see a substantial move away from commercial closed-source tools where organizations can make that move. I have no doubt this is increasing in the coming years.</p><p><em>Originally published at </em><a href="https://www.flood.io/blog/the-state-of-open-source-testing-survey-results-2020"><em>https://www.flood.io</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3782b5864fcc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/open-source-testing/the-state-of-open-source-testing-survey-results-2020-edition-3782b5864fcc">The State Of Open Source Testing survey results, 2020 edition</a> was originally published in <a href="https://medium.com/open-source-testing">Open Source Testing</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[More Transaction stats]]></title>
            <link>https://medium.com/smooth-scaling/more-transaction-stats-a01c333496c5?source=rss-9666baf5e16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a01c333496c5</guid>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[ember]]></category>
            <category><![CDATA[product]]></category>
            <category><![CDATA[load-testing]]></category>
            <dc:creator><![CDATA[Ivan Vanderbyl]]></dc:creator>
            <pubDate>Mon, 12 Sep 2016 06:49:51 GMT</pubDate>
            <atom:updated>2016-09-12T06:51:49.719Z</atom:updated>
            <content:encoded><![CDATA[<p>For the last couple of months we’ve been hard at work building our new dashboard which is now <a href="https://flood.io/app">generally available</a>, and we’re continuing to add improvements.</p><p>Today we added more advanced transaction stats to give you a more complete picture of each step within your test plan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7vPJ183LmOTzh2Ke9ZmKqw.png" /><figcaption>Individual Transaction overview</figcaption></figure><p>We’re now exposing transaction statistics including Passed and Failed counts, Total transactions for the current view, and Maximum and Mean Transaction Rate per transaction.</p><h4>Pro-tip™</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bZnHAN_rMjqRivl_E7kfzQ.png" /></figure><p>This sometimes isn’t the most intuitive UI, but clicking on any of these bars will open the transaction. You can also click the label to select it and show only that transaction on the Timeline chart.</p><p><a href="https://flood.io/">Happy Testing</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a01c333496c5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/smooth-scaling/more-transaction-stats-a01c333496c5">More Transaction stats</a> was originally published in <a href="https://medium.com/smooth-scaling">Smooth Scaling</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Paying per Test or Virtual User is Broken]]></title>
            <link>https://medium.com/@ivanderbyl/paying-per-test-or-virtual-user-is-broken-a1e2df2afb9e?source=rss-9666baf5e16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1e2df2afb9e</guid>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[stories]]></category>
            <dc:creator><![CDATA[Ivan Vanderbyl]]></dc:creator>
            <pubDate>Sun, 05 Jun 2016 11:54:55 GMT</pubDate>
            <atom:updated>2016-06-05T11:54:55.461Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lGPv7pogTyDsZO5cmpTtlw.jpeg" /></figure><p>Selling performance testing services by the number of tests you can run or virtual users you can simulate is a <strong><em>thinly veiled process</em></strong> of extracting the <strong><em>most money in the shortest amount of time</em></strong> from performance testers globally.</p><p><strong>Artificially limiting the concurrency (virtual users), time or quantity of these tests is inherently broken!</strong></p><p>If you have ever used these sorts of services, then you know exactly what I am talking about.</p><h4>A real world example</h4><p>In our experience at Flood IO, most tests run like this:</p><ol><li>Create a test plan</li><li>Shakeout the test with some virtual users</li><li>Realise 10 minutes in that the test plan is wrong</li><li>Stop the test and mutter to yourself, fixing the test plan as you go</li><li>Get it running with some more virtual users</li><li>Realise 10 minutes in that the test plan is less wrong</li><li>Stop the test, face palm and fix the test</li><li>Get it running with another bunch of virtual users</li><li>Realise 10 minutes in that you might have it right and stop to really ramp it up</li><li>Get it running with lots of virtual users and a smug grin on your face</li><li>Realise 10 minutes in that you forgot to to turn off instrumentation on your site and nothing makes sense at load</li><li>Stop the test, swearing, fix the test plan</li><li>Get it running with lots of virtual users again</li><li>It runs well and you extract some usable data, get the data from the system and send it off with a <em>“Yeah, this was no sweat”</em> note to whomever wants it.</li></ol><h4>The addiction of billing</h4><p>In the world of <strong><em>per test or per virtual user</em> <em>billing</em></strong>, you would have been charged (penalised) for every one of those <em>“stop and fix the test plan”</em> steps. More often than not rounded up to the nearest unused quantity of your quota.</p><p>Seriously?</p><p><em>“Yes, that’s right.”</em></p><p>Just used your monthly quota of tests? Need to run 1100 virtual users instead? “<em>Sorry but you can’t proceed until you upgrade to the next plan</em>”.</p><p>The worse thing is that the load testing industry is <strong>so addicted to this idea of selling per test or per virtual user</strong> that it’s become the norm and everyone just accepts it.</p><h4>Wean yourself off the addiction</h4><p>At Flood IO, one of our most common questions is <em>“How many virtual users does your XYZ plan include?”</em> to which we always answer with totally true but seemingly confusing statement of <em>“As many as you want”</em>.</p><p>All the planning in the world can’t predict actual concurrent loads and response times. You might have ramped up too fast, you might have forgotten to take into account a user flow, you might have left some debugging in place which skews your results, your test plan may be unnecessarily complex or your site may already have serious performance issues. Any number of things that make getting concurrency right the first time, every time, impossible.</p><p>If that is the way load testing goes, <strong>then why is it that most performance testing platforms charge per user or per test?</strong></p><p>This frustration was one of the primary factors in why we created Flood IO and is what sets us apart.</p><h4>Do something different</h4><p>At Flood IO, we do something different.</p><p>You boot some load generation server nodes, collectively called a grid. Then you can run as many tests as you like on that grid. <em>Instead of paying per test, or per virtual user, or per report or per anything, </em>you just simply pay for the minutes your grid is running.</p><p>So instead of the real world example blowing out your test or virtual user quota with our competitors, on Flood IO, it would cost you an hour or two of grid time.</p><p>This also means you can start up a small grid for testing at a very cheap rate (or use the free grid hours you get every month as part of your plan) and then when you are ready to scale out, boot up multiple grids to generate as many virtual users as you like.</p><p>Because of our distributed shared nothing architecture the performance you get from a single node is representative of many nodes. We let you start up to 30 nodes per grid with as many grids in as many regions as you like attached to your flood test. Run as many tests as you like. Throw as many virtual users in as you like. This makes it easy for you to baseline performance and plan to scale out from there.</p><p>As one of our happy customers once said:</p><blockquote>Flood IO, stupid simple, stupid cheap!</blockquote><p>We believe strongly that the tools made for our profession should be designed for our profession to be as efficient as possible. We believe penalising quick exploratory load experiments is counter productive. We don’t want to get in the way of your testing, just help you get your testing done.</p><blockquote>Flood IO is an insanely easy to use load testing service that saves you time and money, allowing you to focus on what’s important — Your product.</blockquote><blockquote>Visit <a href="https://flood.io/?utm_source=medium&amp;utm_medium=smoothscaling&amp;utm_term=story&amp;utm_campaign=paying-per-virtual-user-is-broken">flood.io</a> and sign up for a free account.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1e2df2afb9e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why you don’t need Socket.IO]]></title>
            <link>https://codeburst.io/why-you-don-t-need-socket-io-6848f1c871cd?source=rss-9666baf5e16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6848f1c871cd</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[socketio]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Ivan Vanderbyl]]></dc:creator>
            <pubDate>Tue, 15 Mar 2016 03:24:36 GMT</pubDate>
            <atom:updated>2017-12-06T20:36:58.388Z</atom:updated>
            <content:encoded><![CDATA[<p>Asynchronous communication between browsers and servers has come a very long way in the last 6 or 7 years.</p><p>Back then, if you wanted to send a message asynchronously, you had to employ a bunch of hacks. These typically included some or all of the following:</p><ul><li>Long polling</li><li>Flash Sockets (yes, Adobe Flash)</li><li><em>Possible</em> upgrade to WebSockets</li></ul><p>These hacks were commonly employed as part of the very popular abstraction library, <em>Socket.IO</em>. Which was designed to initiate a connection with the lowest common denominator, then ‘upgrade’ the connection if the client supported a better feature.</p><p>This approach worked in nearly all cases, right back to browsers which nobody cares about anymore. However it came at the cost of expensive connection times, excess CPU/Memory/Garbage collection, extra resources to load, and a limited ability to support the developing standard features of the WebSockets protocol, which most notably until very recently, that meant <em>binary streams</em>.</p><h3>Socket.IO</h3><p>Over the years, Socket.IO became insanely popular, with over 25,000 stars on Github, and 5,000+ forks.</p><p>But the project always felt like it was trying to do too much. Is it a chat library? Is it a presence service? Is it a Socket? Is it a Sledgehammer? (I would have named it Sledgehammer.IO)</p><p>Nowadays Socket IO is actually two libraries. Engine.io which powers the socket abstractions, and connection management. And Socket.IO, which from what I can figure handles reconnection, event emitting, and message namespacing (kind of like chat rooms).</p><p>This is all excess when all you really need or want is a Socket.</p><h3>Socket programming</h3><p>Sockets are the basis for all connections over the internet. They are the end pieces which both a client and server terminate a connection with.</p><p>Low level sockets are essentially a stream of bytes. You write to one socket, and it appears byte for byte on the other socket’s read buffer.</p><p>When you make an HTTP request over the internet, it typically opens a socket connection to the server, and sends a request header, followed by an optional request body. This is just a stream of bytes, and it’s up the the receiving socket to know when the message is completely received. For HTTP this is handled by specifying the Length of the payload. The client can then just receive until it has Length bytes, then take those bytes and parse them as a request. To reply, it would then send back a response using the same semantics. Before closing the connection (unless instructed not to by a Keep-Alive header).</p><p>This is essentially what we call Framing messages. More on this later.</p><p>Some streams can be essentially endless and continue to write data, such as a video stream or audio stream. The underlying socket functions the same way, except messages are delineated using a special byte sequence, such as a null byte.</p><p>Up until relatively recently, the Web, as in browsers, didn’t have an equivalent to sockets. You could only make asynchronous requests for resources from the client, but the server never had a way to reply without the client asking it something. Around the time Node.js came along, the ability for the server to send out of band messages to the client was seen as incredibly useful, especially for an async server, which is why Socket.IO became so popular.</p><p>WebSockets were still very young, and there wasn’t yet a protocol standard which all browsers agreed to implement. It took a number of years, and many completing standards before in 2011 <a href="https://tools.ietf.org/html/rfc6455">RFC 6455</a> became the offical WebSocket protocol.</p><h3><strong>WebSockets</strong></h3><p>WebSockets aren’t <em>real</em> sockets. But they’re pretty damn close, and they work remarkably well.</p><p>The WebSocket protocol introduced a couple of extra attributes over the humble TCP socket. Firstly, in order to establish a connection, the client must request an “upgrade” from HTTP to WebSocket during the handshake process. This is initiated using a standard HTTP request to a given WebSocket endpoint. If the server supports WebSockets it will respond with a <em>HTTP/1.1 101 Switching Protocols</em> response, which instructs the client to keep the connection open, and use it as a stream.</p><p>After upgrading the connection, you’re free to send data down the socket in both directions, but here comes the second main difference: You’re not receiving a stream of bytes. All messages are framed automatically by the socket. So once one end finishes writing, the message will be available on the other end, and the socket will automatically decide how many bytes belong to this message. This makes WebSockets considerably easier to program with compared with regular sockets.</p><p>WebSockets also implement their own Ping/Pong semantics to keep the connection alive in the absence of any data being sent. This is something you typically have to account for with TCP sockets to ensure the other end hasn’t gone away.</p><p>Another useful feature of being able to establish a connection using HTTP is the ability to use HTTP authentication semantics for the socket, such as the Authorization header for Basic Auth or Bearer Token Auth.</p><h3>Authentication strategies</h3><p>I mentioned earlier that you can use standard HTTP authentication semantics, however sometimes you want to handle authentication at a later stage, or asynchronously.</p><p>A common pattern for this is to require that the first message over the socket is an authentication message, commonly called an “<em>authentication handshake</em>”. This is where the two parties exchange enough information about each other that they agree to keep the connection open.</p><p>Typically the client exchange with the server something like this:</p><pre>CLIENT &gt; AUTH: secretpasscodeletmein<br>SERVER &lt; OK</pre><p>The server — which is waiting for a message of type AUTH — would take the value and check its authenticity. If the value turns out to be correct, the connection stays open and server replies with some sort of <em>OK</em> message. Otherwise it simply closes the connection.</p><p>Because you can send whatever you like down the socket, it’s up to you to design a protocol which makes sense to both your server and client’s needs. This commonly would include a protocol negotiation message so you can support different features as your app develops without breaking older clients.</p><p>Or using an existing protocol, like <a href="https://stomp.github.io/">STOMP</a> or similar.</p><h3>Use case: Chat</h3><p>Socket IO’s initial attraction was that you could build a chat service which didn’t require continually polling the server for new messages, and anything you types could appear on multiple clients seemingly immediately.</p><p>To implement something like this with WebSockets is actually quite easy, and a lot more flexible than you might expect.</p><p>On the server side you need to handle clients connecting. These will represented as client objects, one for each connection which is open. You might have a flag to indicate a few required attributes about the client:</p><pre>let client = {<br> id: 1,<br> isAuthenticated: true,<br> protocolVersion: 1,<br> connection: &lt;WebSocket Connection instance&gt;<br>}</pre><p>Once authenticated you would set the isAuthenticated flag to true, as there will be some delay between the connection opening and the client sending the initial authentication sequence, and you’ll probably want to exclude this client from certain broadcasts.</p><p>To handle broadcasts to each client, either one-to-one, or one-to-many, you could create a Map, keyed on channel name, with a Set of values representing the IDs of each subscribed client.</p><p>How you establish a subscription is up to you, but it could be as simple as the client exchanging:</p><pre>CLIENT &gt; SUB:general<br>SERVER &lt; OK</pre><pre>CLIENT &gt; UNSUB:general<br>SERVER &lt; OK</pre><p>Then when you have a message to deliver — which could come from another client, internally, or an API request — you just need to look up all the clients associated with that channel, and send the message to each one. Example:</p><pre>const subscriptions = new Map();<br>subscriptions.set(“general”, new Set())<br><br>// Subscribe a client to “general” channel.<br>subscriptions.get(“general”).add(client.id);<br><br>// Send message to a channel<br>subscriptions.get(“general”).forEach((clientId) =&gt; {<br>  clients.get(clientId).connection.send(message);<br>});<br><br>// Unsubscribe<br>subscriptions.get(“general”).delete(client.id);</pre><p>See <a href="https://www.npmjs.com/package/websocket">https://www.npmjs.com/package/websocket</a> for a good starting point for a NodeJS server implementation, of if you’r using Go, <a href="https://github.com/gorilla/websocket">https://github.com/gorilla/websocket</a> is a good choice.</p><h3>Compatibility with other clients</h3><p>A major advantage of adopting WebSockets over Socket IO is interoperability with many different clients. There are standards compliant WebSocket client implementations in ObjectiveC, Javascript, Go, Haskell, Erlang, Ruby, Swift, and of course all major browsers. And this is the way it should be. You shouldn’t need to adapt your code to many different transports that do the same thing.</p><h3>Thanks to Socket IO</h3><p>Without Socket IO a lot of very cool and useful apps would never have been built, and without the hard work of hundreds of contributors the library wouldn’t be were it is today. But I think its time to upgrade to pure WebSockets, and remove the extra cruft from your app.</p><h3>Conclusion</h3><p>If you’re a browser and you need a socket, use WebSockets. <a href="http://caniuse.com/#search=websockets">All major browsers have supported</a> WebSockets for years, so go forth and be async.</p><figure><a href="http://bit.ly/codeburst"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i3hPOj27LTt0ZPn5TQuhZg.png" /></a></figure><blockquote>✉️ <em>Subscribe to </em>Codeburst’s<em> once-weekly </em><a href="http://bit.ly/codeburst-email"><strong><em>Email Blast</em></strong></a><strong><em>, </em></strong>🐦 <em>Follow </em>Codeburst<em> on </em><a href="http://bit.ly/codeburst-twitter"><strong><em>Twitter</em></strong></a><em>, and </em>🕸️ <a href="http://bit.ly/learn-web-dev-codeburst"><strong><em>Learn Full Stack Web Development</em></strong></a><em>.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6848f1c871cd" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/why-you-don-t-need-socket-io-6848f1c871cd">Why you don’t need Socket.IO</a> was originally published in <a href="https://codeburst.io/">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Customer Success Story: How Five Million New Users Joined Rally Without a Hitch]]></title>
            <link>https://medium.com/smooth-scaling/customer-success-story-how-five-million-new-users-joined-rally-without-a-hitch-240b2c71492a?source=rss-9666baf5e16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/240b2c71492a</guid>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[stories]]></category>
            <dc:creator><![CDATA[Ivan Vanderbyl]]></dc:creator>
            <pubDate>Fri, 05 Feb 2016 23:29:47 GMT</pubDate>
            <atom:updated>2016-05-24T15:44:22.208Z</atom:updated>
            <content:encoded><![CDATA[<h4>We love hearing how our customers use Flood to help scale their businesses, and recently our friends at Rally Health shared the story of how they onboarded 5 Million new users, using Flood to ensure it was smooth sailing.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EsnQ4YlcdyD2aawSip8alQ.png" /></figure><p>Rally Health began the new year with a bang. On January 1 we added more than 350 new clients to Rally, which meant we suddenly had 5 million new users eligible to register. Add that to our current users, and it’s a bit like trying to expand your airplane in midair.</p><p>How did we handle it? By all accounts, it was smooth sailing — despite this massive influx of new users, our engineers report that we set up all these clients with no errors whatsoever, which surpassed even our most optimistic predictions.</p><p>How does a company that is barely six years old handle such a huge increase in traffic? Chris Brown, Rally’s vice president of engineering, discusses the challenges his team encountered and how they triumphed over them.</p><p><strong>Chris Brown, Rally Health VP of Engineering:</strong><br> The challenge we faced is that we had to add a large number of new users to the site. On a daily basis, Rally is actually a pretty predictable platform. We know that on a given Wednesday, the traffic will be pretty much the same as the Wednesday before that. Once people establish the habit of using the system, they tend to stick with it.</p><p>Our user growth doesn’t come on a continuous daily basis, but instead comes in spurts tied to key dates around the start of an employer’s plan year. This has some advantages and disadvantages. The advantage is that our site is predictable and stable. The disadvantage is that we’ve never really had to be ready for massive bursts of traffic.</p><p>This year we had a large onboarding event. We brought on a couple million additional users into the system. And even though we knew about this in advance, we still had to make sure that our systems were ready to handle that increase in traffic.</p><p>So we followed a multi-step process. First, we worked with our sales and support teams to understand how many more users we should anticipate, and roughly what the profiles of those users would be. For example, we know that users who have incentives to use the platform are much more likely to use it.</p><p>Our data team tracks key details of site usage, like which users join Challenges or Missions, which ones use incentives, etc. And we used that data to get a sense of how many new people would be joining Challenges, how many would be joining Missions, and so on.</p><p>So we had a rough sense of the number of new users we had to take into the system. We wrote a program that pretends to be a user who does the things a user does when they register for the site. They choose a name, they choose a password, they go through the survey, and then a certain percentage of the time they join a mission, and a certain percentage of the time they join a challenge, and so on.</p><p>And then we took that little program, put it on an external platform called <a href="https://flood.io/">Flood IO</a>, which is a tool that basically runs that program from servers across the United States, but runs it as many times per second, or per minute, or per hour, as we want. We were able to simulate 10,000 or 20,000 pretend users coming at our systems, and then observed how our systems reacted.</p><p>We saw things like, ‘Here’s how long it takes a page to render on our site. When we’re sending no traffic through, it takes X seconds, and when we send 10,000 at once, it takes Y seconds.’</p><p>We did those kinds of measurements and observed where the system was under stress. Then we gradually ramped up the number of users and said, ‘Ah, you know what, when we send this number of users through, our Health Survey starts to slow down, so let’s look at the Survey code as it’s running and see where it’s “hot.”’ And then we addressed that hot spot, rolled a new version of the software out, ran the test again, saw that it was OK now, and kind of pushed the bottleneck further down the pipe.</p><p>Honestly, we’re pretty proud of how we did this. The team kicked off in late October, and in less than three weeks we were able to increase our capacity in that test environment from being able to handle around 700 simultaneous users to around 9,000, so we improved by more than a factor of 10. And once we were confident in what we were doing, we ran similar tests in production and increased capacity there as well.</p><p>And when we actually gave access to the roughly 5.5 million new users on January 1, the process went almost exactly as our predictions told us they would. There were two major places where we found differences.</p><p>As I mentioned, the estimation of load and traffic was based on usage models, and those usage models turned out to be a little more conservative than real life, so we had fewer actual users at any one time than the models indicated. Not by much, but we definitely had less traffic than the models indicated. So as it turned out, we were able to handle more traffic than we had experienced thus far. What this basically means is that people were able to get through the registration process more quickly than we had estimated, which is a good thing, of course.</p><p>That said, we’re still in the midst of the busy part, and so we’re still likely to see higher loads in the next weeks, for example, than we did in the first weeks since January 1. So while it might have looked like the usage models were a little understated, we’re not at the point yet where we can say they definitely were understated.</p><p>And there was another surprise. As I mentioned, we were using a little script to validate and verify what the site was actually doing, and we would run that same program, you know, 10,000 times or whatever the specific number was, to see what the traffic would be like. And there were places in the system that the script didn’t explore or test. Specifically, it didn’t test where users would go from Rally to outside servers.</p><p>And sure enough, when we were in production and actually started sending real traffic to outside servers, their systems couldn’t keep up with the sudden increase in demand, and as a result our systems backed up, so that’s one thing we didn’t anticipate.</p><p>So where the test had to interact for real with the outside world, instead of just staying within the test environment, that’s where we had scale issues. I think if there’s a lesson learned, it’s that we need to be more thoughtful about where those boundaries are, and maybe collaborate with our partners to make sure that they’re able to handle the test.</p><p>One thing that stands out for me is that in order to do this testing, we had a couple of team members who started shifting their schedules so they could start their day as our real site traffic was ramping down in the evenings or late at night, so that they could go in and sort of “experiment on the patient” while it was still alive, you know? We realized that to be effective, a lot of this work would have to happen overnight. We had to give people permission to do that, make sure we were covering for the night owls during the day, and then have explicit handoffs where we transitioned from night to day.</p><p>Of course, that’s not the kind of thing you want to make habitual, but we had people with expertise who cared enough to make this happen overnight, and most of them happened to have babies, so it’s not that big a deal to be up late at night anyway! That really helped us drive it through. And we were able to handle that in a way that was positive instead of negative.</p><p>And it’s going to sound sort of corny, but even though our team on this was kind of small, you know, it was 11 people, I think it’s the first big project where we had representation on the team from every Rally office. We had DC, San Francisco, Chicago, Denver, Minneapolis. We’ve never had that much intra-office collaboration on something like this. We had the guy in DC describing how things are designed, the guy in Chicago actually applying fixes, the guy in Minneapolis making sure it’s correct, the coordination happening out of San Francisco. And I know we do a lot of cross-office work here at Rally, but this was the most cross-office collaboration that I have seen.</p><p>It also shows why I love working at Rally. This company offers a great combination of “startup” mentality with stability. It’s an awesome feeling. We have the market momentum and capabilities of a big company, but we’re still hustling and staying hungry and are ready for anything. We’re scrappy, but stable. You know, I just can’t get enough of that.</p><p><em>Originally published at </em><a href="https://www.rallyhealth.com/building-a-bigger-airplane-while-youre-flying/"><em>www.rallyhealth.com</em></a><em> on February 5, 2016.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=240b2c71492a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/smooth-scaling/customer-success-story-how-five-million-new-users-joined-rally-without-a-hitch-240b2c71492a">Customer Success Story: How Five Million New Users Joined Rally Without a Hitch</a> was originally published in <a href="https://medium.com/smooth-scaling">Smooth Scaling</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Leaving New York]]></title>
            <link>https://medium.com/@ivanderbyl/leaving-new-york-2d0eee0f93c0?source=rss-9666baf5e16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d0eee0f93c0</guid>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[leaving]]></category>
            <category><![CDATA[nyc]]></category>
            <dc:creator><![CDATA[Ivan Vanderbyl]]></dc:creator>
            <pubDate>Thu, 31 Dec 2015 07:44:30 GMT</pubDate>
            <atom:updated>2015-12-31T07:44:30.454Z</atom:updated>
            <content:encoded><![CDATA[<p><em>By </em><a href="https://twitter.com/ivanderbyl"><em>Ivan Vanderbyl</em></a></p><h4>This is the second story in the set: <a href="https://medium.com/@ivanderbyl/cf3d28d41382">My 2015 — The Year Of Transience</a></h4><p>One thing which probably helped the feeling of being stuck more so than secure in New York was the fact that I had to pay many months of rent in advance to get an apartment, because being a new resident alien I had no Credit History in America. There was also this clause in my lease near the end — after all the riders about bed bugs, rats, scratching walls, and multi-tenancy — which said that breaking the lease would not only render my deposit void but exclude any possibility of getting back the months of rent I’d paid in advance for which I had not yet used. But if I sublet to someone else, then that didn’t break any rules.</p><p>So the plan was to find a sublet using Craigslist, because everyone in New York uses Craigslist to take out their dirty laundry, so to speak. And more than one colleague had said something like <em>“You’ll have no problem filling your apartment, you might even make a profit, it’s a very competitive market out here”.</em></p><p>I listed my 7 month old, 600 square foot apartment on Craigslist with some nice photos and a pretty compelling pitch. After 3 weeks and countless re-posts with variations on the same tune, not a single person had committed even coming to look at it. I did get offers for everything from drugs, sex, and Ponzi schemes in the process. Apparently listing your place on the sublets list is somehow a free for all where classification is ignored, or maybe that’s all of Craigslist, I didn’t hang around long enough to find out.</p><p>After some thinking I concluded I should list it on the same site I found it on, StreetEasy. It cost a few hundred bucks but it sure was worth it.</p><p>Less than a day later, a Thursday evening if I recall, an actress from LA walked through the door with her film director boyfriend, didn’t say much except for some pointed questions and then asked if I could be out of there by Saturday. I said sure, if she can pay all the rent in advance.</p><p>A few days later as I was moving my things out and she was loading her new place up with more boxes of belongings than I could have stored everything I’d owned in my life so far, she asked “What do you do for living?”, I responded with my usual terse acclaim “I build apps and stuff”.</p><p><em>Cool, like a hacker?</em></p><p><em>“Sure, if you’re not referring to the kind that find exploits in other people’s systems.”</em> She was actually referring to that type, but <a href="https://aeon.co/essays/how-yuppies-hacked-the-original-hacker-ethos">the term Hacker has become synonymous with both building things and breaking things</a> I suppose.</p><p><em>“Wow so you like work with computers all day yeah?”</em></p><p><em>“Yep, pretty much all the time”</em> I said, as I felt this conversation heading down the sort of cliché dark hole of a nerdy college flick from the 90s.</p><p><em>“I’m actually an actress, I’m working on a show called </em><a href="https://www.youtube.com/watch?v=Ug4fRXGyIak"><em>Mr Robot</em></a><em>, have you seen it?”</em></p><p><em>“Nope, never heard of it”</em> I responded, thinking oh god this is going to as bad as CSI Cyber with a token white guy in a suit saying “zoom and enhance” over and over to reproduce the registration plate of a car seen in the reflection of a chrome surface through a window in some low resolution surveillance footage taken from a camera across the street. Which only somehow survives any credibility because the audience is too stupid to know that this is infact a plot hole.</p><p>I also already knew she was an actress from pulling her name from our email exchange and finding her IMDB page, which was impressive both in that that it was the last result I expected, and that she’d been in some pretty big stuff on American TV, and had a nomination or two. But regardless I never follow pop culture closely enough to even be able to identify half the actresses men or women in America talk about wanting to fuck.</p><p>Mr Robot however was not yet listed on her IMDB, so I hadn’t heard of it. But she did assure me it wasn’t as bad as CSI Cyber, and that the writer <a href="http://www.imdb.com/name/nm1322753/?ref_=tt_ov_wr">Sam Esmail</a> had done a lot of research to avoid said plot holes.</p><p>A few weeks later I was flying to San Francisco and saw season 1 of Mr Robot on the inflight entertainment, and binge watched half of it. I can assure you it’s quite good, so much so that my friends who actually work in cyber security begrudgingly enjoy it, and I’m glad to see an American TV show including some themes which wouldn’t have been seen ten years ago.</p><p>Carly ended up being the perfect person to sublet to because I think she was constantly expecting some asshole from New York to do wrong by her, so when I didn’t, things worked out well.</p><p>In the end I didn’t get my deposit back due a few unrelated technicalities, which taught me a solid lesson about New York and stands as a testament to a constant reminder I was first told by a dear friend before moving there:</p><blockquote>New York will eat you, if you let it. — Dee-Jane</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*nSzX8k69OYWkDPfVg0sAeQ.jpeg" /><figcaption>The same quote depicted on a poster on my walk to work, July, 2014. Artist: <a href="https://www.instagram.com/ivanorama/">Ivan Orama</a></figcaption></figure><p>I’ll publish the third story soon in a few days.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d0eee0f93c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My 2015 — The Year Of Transience]]></title>
            <link>https://medium.com/@ivanderbyl/my-2015-the-year-of-transience-cf3d28d41382?source=rss-9666baf5e16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf3d28d41382</guid>
            <category><![CDATA[new-york]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Ivan Vanderbyl]]></dc:creator>
            <pubDate>Thu, 31 Dec 2015 07:42:41 GMT</pubDate>
            <atom:updated>2015-12-31T07:42:41.800Z</atom:updated>
            <content:encoded><![CDATA[<p><em>By </em><a href="https://twitter.com/ivanderbyl"><em>Ivan Vanderbyl</em></a></p><h4>2015 has been the most impactful year of my life so far. I took more photos than any previous year, I quit my job, met more interesting people than ever before, and discovered things about myself which I would have never considered had this year started any other way.</h4><h4>Inspired by the recounts of <a href="https://medium.com/u/7ee29b787e9">Tobias van Schneider</a>, I’ve put together a few stories and philosophical rants to look back on. It’s by no means inclusive, but because I hate writing quick takeaway points I’m releasing these as individual posts.</h4><h4>This is the start.</h4><h3>New York City — Winter</h3><p>Starting the year in Winter in my East Village, New York apartment was definitely something portrayed better in the movies. For better or worse, probably more worse, this set the year off to a rocky start with my then girlfriend Hannah Wolff, an aspiring actress from Chicago trying to make it in New York.</p><p>While I was crazy about her and wouldn’t stop talking about her to friends, there was some pretty deep rooted problems from the start which I’ll gloss over. Although this was the early months of our relationship by any measure, she tried very hard to hold things together while I was longing to leave New York.</p><p>Looking back on this now, I wasn’t running away from her or New York, rather I was running away from the job I had at DigitalOcean. Work and life had collided so much that I couldn’t see the forest from the trees.</p><p>DigitalOcean sure had a lot of moments I could write about but now’s not the time or place. It was however an exciting time to be part of a fast growing tech company which more than doubled in size while I was there, and be at the center of all the problems this causes as founders and early employees fight to distill some sense of unified culture, process, and product direction in the fresh blood of new team members. But ultimately it left a sour taste in my mouth with constantly playing politics to get even the smallest product changes into production.</p><p>I also developed a fond dislike of the American work culture, and how everyone seemed to be a slave to The Company, and taking time off and not working 12 hour days was disincentivized.</p><p>I think NYC is an amazing city, where you can have unlimited potential to be anyone, just so long as you pay rent first, don’t piss off your landlord, and don’t get arrested for buying drugs outside Williamsburg bar at 2am (that bit wasn’t me, but it did happen).</p><p>Speaking of being a slave to The Company, I knew that if I quit, my Work Visa would expire 10 days later, so timing was tricky. But one day I’d just had enough and told my manager I was rolling out at the end of the month.</p><p>We played the usual dance of promised promotions and more interesting projects. But staying for the money would have been selling out my future ambitions, and I had at least one of those I wanted to pursue more than ride this rollercoaster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tXpK4iA6oYMl5Ma_xtmcWg.jpeg" /><figcaption>The view from my apartment in the East Village, NYC. Early January 2015, capturing a bright sunset after a few days of snowfall.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E3kbIq2VOWy8WOwluS75Og.jpeg" /><figcaption>A food delivery guy bracing the cold during the first blizzard of the season. 1st Ave, New York City, Jan 2015.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bVzvnHY57_KJU2bn4JWfBw.jpeg" /><figcaption>The view from the rooftop of the former DigitalOcean HQ in Soho, Manhattan. July 4th, 2014.</figcaption></figure><p>I hope you enjoyed the first story. Read next story <a href="https://medium.com/@ivanderbyl/2d0eee0f93c0">Leaving New York</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf3d28d41382" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Load testing the Amazon API Gateway]]></title>
            <link>https://medium.com/@ivanderbyl/load-testing-the-amazon-api-gateway-82f3f1b4c24b?source=rss-9666baf5e16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/82f3f1b4c24b</guid>
            <category><![CDATA[aws-api-gateway]]></category>
            <category><![CDATA[product]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Ivan Vanderbyl]]></dc:creator>
            <pubDate>Fri, 18 Dec 2015 00:10:57 GMT</pubDate>
            <atom:updated>2016-05-17T03:50:59.319Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>Amazon </em><a href="https://aws.amazon.com/api-gateway/"><em>API Gateway</em></a><em> is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale.</em></blockquote><p>This post helps Flood IO customers get up and running with load testing for their own API gateway.</p><p><em>Please note: the default limit for API Gateway is 500 RPS as we soon discover in this post. For more info about rate limits including how to raise this </em><a href="http://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html"><em>see here</em></a><em>.</em></p><h3>Load Test API</h3><p>After creating a gateway you will add resources to that gateway in your AWS console. We’ve set up three methods and deployed it <a href="https://7wam4h0629.execute-api.us-west-2.amazonaws.com/production/">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/0*ESZbBW0927Ea3gnj.png" /><figcaption>API Gateway Console</figcaption></figure><p>The HTTP, DELETE, POST and GET methods act as a simple proxy to our backend <a href="https://loadtest.flood.io/">load testing</a> service which we host for the purpose of demonstration. Each call returns a JSON payload with some information about the service.</p><pre>~ » curl -s -X GET https://7wam4h0629.execute-api.us-west-2.amazonaws.com/production/ | jq -r .<br>{<br>  &quot;elapsed&quot;: &quot;1.001 seconds&quot;,<br>  &quot;status&quot;: &quot;OK&quot;,<br>  &quot;connections_active&quot;: 4,<br>  &quot;connections_waiting&quot;: 3<br>}</pre><h3>Creating a Load Test</h3><p>We’re using our favoured <a href="https://blog.flood.io/load-testing-a-restful-api-with-ruby-jmeter/">Ruby-JMeter</a> tool to write our tests in an expressive DSL which simplifies the process of crafting a load test.</p><p>You can see the full <a href="https://github.com/flood-io/loadtest/blob/master/tests/loadtest-api.rb">script here</a> but the takeaway from that is we’re exercising our 3 resource calls on the API itself.</p><p>As our API is protected by an API key we can specify that as an additional header in each request. We can also specify the Accept header value for application/json</p><pre>header [  <br>    { name: &#39;x-api-key&#39;, value: &#39;BguwPvwIHD4vTTq2MHL3HTWKibe4LHC9GZYV4FUi&#39; },<br>    { name: &#39;Accept&#39;, value: &#39;application/json&#39; },<br>  ]</pre><p>We can also simulate request User-Agent headers as if they’re coming from an iPhone with a handy helper like this.</p><pre>with_user_agent :iphone</pre><p>Our <strong>first request</strong> is a HTTP GET to the entry point of our API. We make that request and also assert that the response payload contains the JSON value OK for the <em>status</em> key.</p><pre>get name: &#39;entry point&#39;, url: &#39;/production&#39; do  <br>  assert json: &#39;.status&#39;, value: &#39;OK&#39;<br>end</pre><p>Our <strong>second request</strong> is a HTTP POST to the create session endpoint. We’re passing in username and password parameters as part of the request. In the response we’re extracting the value from the connections_active key which we’ll use in our third request.</p><pre>post name: &#39;create session&#39;, url: &#39;/production&#39;,  <br>  fill_in: {<br>    username: &#39;MrRobot&#39;,<br>    password: 4141414141<br>  } do<br>    extract json: &#39;.connections_active&#39;, name: &#39;connections_active&#39;<br>  with_xhr<br>end</pre><p>In our <strong>third request</strong> we make a HTTP DELETE call to the destroy session endpoint. We pass it the connections variable we extracted from the prior response, and we’re also specifying a duration assertion of 5 seconds, so we can mark the request as failed if the response takes longer than that.</p><pre>delete name: &#39;destroy session&#39;, <br>url: &#39;/production?connections=${connections_active_1}&#39; do  <br>  duration_assertion duration: 5_000<br>end</pre><p>We use the flood method to trigger the load test on Flood IO specifying the ID of a 10 node grid we already had running for the demonstration.</p><pre>flood ENV[‘FLOOD_API_TOKEN’], { <br> privacy: ‘public’, <br> name: ‘Shakeout Loadtest API’, <br> grid: ‘Wvf78fVsSWvTekNftt3ZsQ’ <br>}</pre><h3>Analysing the Results</h3><p>In just a couple of minutes you’ll be <a href="https://flood.io/qeneJwfeWJP96hflFvwIgQ">analysing your results</a> on Flood IO.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/0*52lwPqQI1T_qQka6.png" /></figure><p>So why the big spike in Response Time (blue line) before it drops back down?</p><p>We can see RT climbs to around 4 seconds before it backs off, we can also see an increase in overall transaction throughput (green line).</p><p>Looking at individual transaction statistics and traces the answer is evident.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/0*7Kh5F4HEsqdLQpzI.png" /></figure><p>The API has a high percentage of errors at about the same time. Most of these errors are <em>HTTP 429</em> response codes which we capture sample response headers for you to help debug.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/0*aZF6El1zACA0ChjH.png" /></figure><p>We can see that this is a <a href="http://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html">rate limit</a> type of error with the header x-amzn-ErrorType : TooManyRequestsException. Our API has been throttled to an arbitrary <em>500 requests per second</em> and we soon receive an email notification warning us this has occurred on our account from AWS.</p><p>Our CloudWatch dashboard is also helpful in tracking down issues, we notice some <em>HTTP 5XX</em> response codes are present in the test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/0*G2Ho_YFRlnHWVMhu.png" /></figure><p>These look like <em>HTTP 504 Gateway Timeouts</em> on CloudFront in Flood IO</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/0*COwfAStS1SDmiK4S.png" /></figure><h3>Next Steps</h3><p>Following this first round of testing it’s sensible to request larger rate limits if your production throughput is going to be an order of magnitude larger than 500 requests per second.</p><p>We used a grid of 10 nodes but you can set up multiple grids in multiple regions to have more sessions coming from unique IPs which will reduce the likelihood of rate limiting from single load generation origins.</p><p>If you’d like to conduct higher volume load testing with <a href="https://flood.io/">Flood IO</a> please contact support at flood.io and we can help via our partnership with AWS to prepare and scale your load tests.</p><p><em>Originally published at </em><a href="https://blog.flood.io/load-testing-amazon-api-gateway/"><em>blog.flood.io</em></a><em> on December 18, 2015.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82f3f1b4c24b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ember Best Practices: Component inverse templates]]></title>
            <link>https://medium.com/@ivanderbyl/ember-best-practices-component-inverse-templates-42bee18bb445?source=rss-9666baf5e16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/42bee18bb445</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[ember]]></category>
            <dc:creator><![CDATA[Ivan Vanderbyl]]></dc:creator>
            <pubDate>Tue, 08 Dec 2015 06:26:36 GMT</pubDate>
            <atom:updated>2015-12-08T06:34:46.717Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc/4.0/</cc:license>
            <content:encoded><![CDATA[<p>Over the past couple of weeks I’ve been working on a dropdown menu component for the new Flood IO Dashboard, and I’d like to share with you an undocumented but very useful feature of Ember Components we’ve been using.</p><p>When building a generalised dropdown component which has an easy to understand API, you quickly find yourself in need to being able to render two templates depending on the state of the dropdown. Typically one for the trigger and one for the dropdown container. Of course you could use a bunch of <em>if statements </em>to decide which template to render, but the API you end up exposing becomes pretty verbose.</p><pre>{{!-- verbose-example.hbs --}}<br><br>{{#my-dropdown as |isOpen|}}<br>  &lt;button onclick={{toggleOpen}}&gt;Menu&lt;/button&gt;<br>  {{#if isOpen}}<br>    &lt;ol class=&quot;menu-items&quot;&gt;<br>      &lt;li&gt;Item 1&lt;/li&gt;<br>      &lt;li&gt;Item 2&lt;/li&gt;<br>    &lt;/ol&gt;<br>  {{/if}}<br>{{/my-dropdown}}</pre><p>I don’t want the end user to have to specify an if statement every time they use my component, so to work around this we can specify a second template using the <em>{{else}} </em>statement. This becomes the <em>inverse-template</em>.</p><pre>{{!-- verbose-example.hbs --}}<br><br>{{#my-dropdown as |isOpen|}}<br>  &lt;ol class=&quot;menu-items&quot;&gt;<br>    &lt;li&gt;Item 1&lt;/li&gt;<br>    &lt;li&gt;Item 2&lt;/li&gt;<br>  &lt;/ol&gt;<br>{{else}}<br>  Menu<br>{{/my-dropdown}}</pre><p>Then you can decide how you render each of these, but essentially in a dropdown use-case you will only <em>yield </em>one of them when <em>isOpen </em>is true.</p><pre>{{!-- my-dropdown.hbs --}}<br><br>&lt;div class=&quot;trigger&quot;&gt;<br>  {{#if (hasBlock &quot;inverse&quot;)}}<br>    &lt;button onclick={{toggleOpen}}&gt;{{yield to=&quot;inverse&quot;}}&lt;/button&gt;<br>  {{else}}<br>    &lt;button onclick={{toggleOpen}}&gt;{{label}}&lt;/button&gt;<br>  {{/if}}<br>&lt;/div&gt;<br><br>{{#if isOpen}}<br>  &lt;div class=&quot;dropdown-container&quot;&gt;<br>    {{yield}}<br>  &lt;/div&gt;<br>{{/if}}</pre><p>An added advantage is that we can make the inverse template optional, and fallback to the label property if we want, and abstract the trigger away to our component. This way we don’t leak any internal APIs to the end user.</p><p>Here’s an <a href="https://ember-twiddle.com/7c4b286315aad9fb5289">Ember Twiddle</a> to explain this in practice.</p><p>This feature was introduced in Ember 1.13, so you should be okay to use it today. Documentation is however missing, so I can’t guarantee this API won’t change in the future. It works in Ember 2.2 though.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42bee18bb445" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ember Computed Style]]></title>
            <link>https://medium.com/the-ember-way/ember-addon-computed-style-3e80dd122be0?source=rss-9666baf5e16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e80dd122be0</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[ember]]></category>
            <category><![CDATA[addons]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Ivan Vanderbyl]]></dc:creator>
            <pubDate>Tue, 08 Dec 2015 05:49:01 GMT</pubDate>
            <atom:updated>2016-06-18T20:58:41.115Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-nd/4.0/</cc:license>
            <content:encoded><![CDATA[<p>For most of last year I was a React developer at DigitalOcean, and I still observe what’s happening in the React world. One feature I have missed from React is the ability to define styles on your components using Javascript.</p><p>While of course you can do this in Ember by producing a string of styles and binding it to the <em>style</em> attribute, it can become complicated when you want to produce a style string from multiple computed properties, not to mention string interpolation just looks awful when skimming over code.</p><p>To solve this problem I’ve released a new add-on called <em>ember-computed-style</em>, which allows you to define styles as objects and have them bound as a style string computed from the keys and values, which is then escaped for safety in Handlebars.</p><h4>Example:</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/478601a6e7a36ac1c77d7c71c59ef4c3/href">https://medium.com/media/478601a6e7a36ac1c77d7c71c59ef4c3/href</a></iframe><p>I’ll let the above code do all the talking.</p><p>When this component renders it will set the <em>style</em> attribute with the computed style string based on the <em>backgroundStyle </em>property<em>.</em></p><pre>&lt;div style=&quot;background-color:red;&quot; class=&quot;ember-view&quot;&gt;...</pre><p>Of course the property names will be dasherized, and the values will be interpreted correctly as to whether they should be unit-less or not. So you can specify margins and positioning as regular numbers and have them rendered in <em>“px”</em> units.</p><p>If you want to remove a property completely, just have it return <em>null or some empty value</em>. This is useful for <em>display: none; </em>toggles.</p><h3>Get Started</h3><p>Install the Ember addon the usual way:</p><pre>ember install ember-computed-style</pre><p>Importing the library:</p><pre>import computedStyle from &quot;ember-computed-style&quot;;</pre><p>That’s pretty all there is to it. I welcome contributions, so please check out the GitHub repo <a href="https://github.com/ivanvanderbyl/ember-computed-style">ivanvanderbyl/ember-computed-style</a> and let me know if you find any issues.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e80dd122be0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-ember-way/ember-addon-computed-style-3e80dd122be0">Ember Computed Style</a> was originally published in <a href="https://medium.com/the-ember-way">The Ember Way</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>