<?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 David Glasser on Medium]]></title>
        <description><![CDATA[Stories by David Glasser on Medium]]></description>
        <link>https://medium.com/@glasser?source=rss-228e21ff506a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*PybIPLkUwQ5t0gl5.jpg</url>
            <title>Stories by David Glasser on Medium</title>
            <link>https://medium.com/@glasser?source=rss-228e21ff506a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 18:57:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@glasser/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[Set up GraphQL caching and performance monitoring in minutes]]></title>
            <link>https://medium.com/apollo-stack/graphql-caching-and-performance-monitoring-in-minutes-with-apollo-engine-9b8e5da57bfb?source=rss-228e21ff506a------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b8e5da57bfb</guid>
            <category><![CDATA[apollo]]></category>
            <category><![CDATA[apollo-engine]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[graphql]]></category>
            <dc:creator><![CDATA[David Glasser]]></dc:creator>
            <pubDate>Wed, 07 Mar 2018 21:38:34 GMT</pubDate>
            <atom:updated>2018-03-12T20:10:21.866Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introducing version 1.0 of the apollo-engine npm package and Docker container</h4><p><a href="https://www.apollographql.com/docs/engine/">Apollo Engine</a> is a GraphQL gateway that provides caching, performance monitoring, and other features specifically for GraphQL. It’s built from the ground up to empower product developers to feel confident about using GraphQL on top of existing infrastructure.</p><p>Today, we’re launching the 1.0 version of the apollo-engine npm package and our standalone Docker container. These new releases make it dramatically easier to add Engine to your server.</p><p>In the past, you had to add code in several places and attach middleware to your app in a specific order, but now it’s much clearer where everything needs to go for a production-ready setup.</p><h4>The new setup experience</h4><p>Apollo Engine provides a ton of valuable features to help you work with GraphQL, and can handle millions or even billions of requests a day, but at the same time we want to make sure it’s a breeze to get started with.</p><p>If you want to use Engine with Apollo Server and Node.js, setup is now as simple as can be:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7d8bb5e853b5dfe462f9523ee7d5f72f/href">https://medium.com/media/7d8bb5e853b5dfe462f9523ee7d5f72f/href</a></iframe><p>You can get an API key by logging into the <a href="https://engine.apollographql.com/">Apollo Engine app</a>. Once you put in the API key, run your server, and execute some queries, you’ll be able to see traces of your queries, track errors, set up caching, and more!</p><p>For all of the details, read the setup directions in the docs:</p><ul><li><a href="https://www.apollographql.com/docs/engine/setup-node.html">For Node.js</a></li><li><a href="https://www.apollographql.com/docs/engine/setup-standalone.html">For other languages</a></li></ul><h3>Improvements from previous versions</h3><p>This new release comes with several improvements that make Engine easier to use while expanding support to more servers.</p><h4>Simpler API</h4><p>We’ve updated the API and documentation to make it easier to set things up correctly. The previous API required code to be added in very specific places, and the new one is much easier to explain and use correctly.</p><p>If you are already using Engine, upgrading is easy:</p><ul><li>Instead of using a middleware like engine.expressMiddleware(), you replace your app’s app.listen(port) call with engine.listen({ port, expressApp: app }). This reduces code duplication and removes the need to worry about middleware ordering.</li><li>Instead of the Engine constructor with an engineConfig: {...} option, you now import an ApolloEngine constructor which takes the Engine config directly. Any Node-specific options are passed into the listen function above. This helps avoid confusion about where configuration should be passed.</li></ul><p>For all of the details, <a href="https://www.apollographql.com/docs/engine/1.0-migration.html">read the upgrade guide in the docs</a>.</p><h4>Expanded Node web framework support</h4><p>Because the new API relies on the standard Node listen interface instead of framework-specific middlewares, we’ve <a href="https://www.apollographql.com/docs/engine/setup-node.html#not-express">expanded our support of Node server frameworks</a>. Engine now supports Express, Hapi, Koa, Micro, Restify, Meteor, and even the built in http.Server.</p><h4>Less overhead</h4><p>Even thought it’s easy to install with npm, the part of Engine that you run inside your server is written in Go for better performance and stability. In the previous version, the web framework middleware you installed routed GraphQL requests to the Engine binary, and they were routed back to actually execute your GraphQL schema. With the new 1.0 API, all requests hit the Engine binary directly, and non-graphql requests are passed through. This new approach involves fewer roundtrips, making it even better than the previous approach while actually being easier to set up.</p><h4>Easier to use with non-Node servers</h4><p>We’ve always distributed the Engine proxy binary both via the apollo-engine npm module (for use with Node GraphQL servers) and as a standalone Docker container (for other servers). We’ve made two improvements to how we support non-Node servers. First, we’re now using the same version numbers to tag the Docker container as we are for the npm module. So today is version 1.0.1 of both distributions, and the same <a href="https://www.apollographql.com/docs/engine/proxy-release-notes.html">release notes</a> describe updates to both distributions. Secondly, because we know it’s not easy to run Docker containers in every hosting environment, we’ve added a <a href="https://www.apollographql.com/docs/engine/setup-standalone.html#apollo-engine-launcher">new ApolloEngineLauncher API to the npm module</a> which you can use to run the Engine binary as a standalone process with no Node web framework integration.</p><h3>What you’ll see in the Engine UI</h3><p>Once you get Engine set up, you’ll be able to look at <a href="https://www.apollographql.com/docs/engine/performance.html">detailed traces of your GraphQL queries</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-PiUjyhfH11jkzBLAmmTTQ.png" /></figure><p>Track your query performance distribution over time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vv0hvvbZzjP0igz_S00uXg.png" /></figure><p><a href="https://www.apollographql.com/docs/engine/caching.html">Cache GraphQL results</a> to make common queries resolve in a matter of microseconds:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4z5FSggjOdHGzC7qXw1zKQ.png" /></figure><p>And more — there are a lot of other capabilities that you can learn about in the <a href="https://www.apollographql.com/docs/engine/">Engine docs</a>. We’ve hand-picked this set of functionality over the last two years of talking to companies using GraphQL in production.</p><h3>Continuous improvement</h3><p>In addition to overhauling the API you use to set up Apollo Engine in your app, we’ve also started a total rework of <a href="https://www.apollographql.com/docs/engine/">our documentation</a>, beginning with the setup instructions. Keep an eye on our blog over the next few weeks to learn more about what Apollo Engine is, how it’s getting easier to use, and what features we’re working on next!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F64a355%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2F64a355&amp;image=https%3A%2F%2Fucarecdn.com%2F83c581fe-a404-4dd3-b60c-ad9f5cb4b6ef%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/e2636327dd804c0413fe8ac3f5884859/href">https://medium.com/media/e2636327dd804c0413fe8ac3f5884859/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b8e5da57bfb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/apollo-stack/graphql-caching-and-performance-monitoring-in-minutes-with-apollo-engine-9b8e5da57bfb">Set up GraphQL caching and performance monitoring in minutes</a> was originally published in <a href="https://medium.com/apollo-stack">Apollo GraphQL</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[New in Galaxy: custom base images and custom logging!]]></title>
            <link>https://blog.meteor.com/new-in-galaxy-custom-base-images-and-custom-logging-8eb96fa80c73?source=rss-228e21ff506a------2</link>
            <guid isPermaLink="false">https://medium.com/p/8eb96fa80c73</guid>
            <category><![CDATA[meteor]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[node]]></category>
            <dc:creator><![CDATA[David Glasser]]></dc:creator>
            <pubDate>Thu, 08 Feb 2018 18:21:27 GMT</pubDate>
            <atom:updated>2018-02-08T18:21:58.904Z</atom:updated>
            <content:encoded><![CDATA[<p>We’re excited to announce new Galaxy features and docs which provide more flexibility for our advanced users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*snL94-RTfOuYNTaNL1Y3ng.png" /></figure><h3>Run anything in your container with custom base images</h3><p>Galaxy provides a zero-configuration way to deploy your Meteor apps to the cloud. But sometimes you need a little configuration. For example, you may want to call native libraries that aren’t distributed via npm, or include some large files in your container that you don’t want to upload every time you run meteor deploy.</p><p>Galaxy containers are built using the standard <a href="https://www.docker.com/">Docker</a> container management platform. Every container is built by adding your uploaded app code to a “base image”. Up until now, every Galaxy app shared the same base image: a Ubuntu Linux 14.04 environment with a <a href="http://galaxy-guide.meteor.com/base-image-packages.html">handful of extra packages</a> requested by customers. Most of these popular packages were native dependencies required by npm modules, primarily for image rendering. Because every app shared the same base image, we couldn’t easily upgrade these packages without possibly breaking other customers, and so these packages have not been updated since 2016.</p><p>We’re excited to announce a better way to bring non-npm dependencies into your Galaxy app: <a href="http://galaxy-guide.meteor.com/custom-base-images.html"><strong>custom base images</strong></a>! You can now request that Galaxy use any Docker image publicly available on <a href="https://hub.docker.com/">Docker Hub</a> as a base image, as long as the image contains a script that that can import your uploaded app. Full details are available in the <a href="http://galaxy-guide.meteor.com/custom-base-images.html">Galaxy Guide</a>. You can also check out the newly-released source to the <a href="https://github.com/meteor/galaxy-images">default base image</a>.</p><p>While our main goal with this feature is to enable Meteor users to deploy apps that require OS-level dependencies to install, we look forward to hearing how our customers will take advantage of this flexible feature. For example, you could use this to run non-Meteor code in your container alongside your app, or to run worker nodes built on other platforms in their own Galaxy app alongside your main Meteor app. This feature was built by <a href="https://medium.com/u/ab5ecaa74a58">Changping Chen</a> during his internship at MDG!</p><h3>Unlimited log history and flexibility with custom log storage</h3><p>Galaxy lets you view and search your logs with zero configuration on the Logs tab on your app’s dashboard. However, Galaxy only retains one week of app logs, and the dashboard logs viewer only offers basic search features. Customers interested in more detailed log access can now enable <a href="http://galaxy-guide.meteor.com/logs.html#custom-storage">custom log storage</a>!</p><p>With custom log storage, Galaxy can stream logs to any <a href="https://www.elastic.co/products/elasticsearch">Elasticsearch</a> server. It’s easy to set up your own server with hosted services like <a href="https://www.elastic.co/cloud">Elastic Cloud</a> or <a href="https://aws.amazon.com/elasticsearch-service/">Amazon Elasticsearch Service</a> or on your own infrastructure. Because logs are hosted on your own servers, you can use any Elasticsearch tool to investigate your logs, like <a href="https://www.elastic.co/products/kibana">Kibana</a>, and you can set your own expiration policy. Even with custom log storage enabled, we’ll still keep track of your last week of logs on our dashboard.</p><h3>Detailed docs on what’s under the hood</h3><p>As part of documenting the custom base images feature, we’ve greatly expanded our documentation of exactly what happens when you typemeteor deploy, including our container image build process and health checking. Find out more about <a href="http://galaxy-guide.meteor.com/base-image-packages.html">our default base image</a>, <a href="http://galaxy-guide.meteor.com/custom-base-images.html">building custom base images</a>, and the <a href="http://galaxy-guide.meteor.com/container-environment.html">container execution environment</a>.</p><p>If you aren’t using Galaxy to deploy your Meteor apps yet and the features above sound exciting, <a href="https://www.meteor.com/hosting">give it a try today</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8eb96fa80c73" width="1" height="1" alt=""><hr><p><a href="https://blog.meteor.com/new-in-galaxy-custom-base-images-and-custom-logging-8eb96fa80c73">New in Galaxy: custom base images and custom logging!</a> was originally published in <a href="https://blog.meteor.com/">Meteor Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dynamic GraphQL polling with React and Apollo Client]]></title>
            <link>https://medium.com/apollo-stack/dynamic-graphql-polling-with-react-and-apollo-client-fb36e390d250?source=rss-228e21ff506a------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb36e390d250</guid>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[apollo]]></category>
            <category><![CDATA[meteor]]></category>
            <category><![CDATA[web-hosting]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[David Glasser]]></dc:creator>
            <pubDate>Tue, 05 Dec 2017 19:22:05 GMT</pubDate>
            <atom:updated>2017-12-05T19:25:39.557Z</atom:updated>
            <content:encoded><![CDATA[<h4>Setting the poll interval based on query results</h4><p>I recently added a feature to the admin interface on <a href="https://www.meteor.com/hosting">Meteor Galaxy</a>, Meteor Development Group’s hosting platform for Meteor apps, that shows the state of our internal database migrations. I’m using <a href="https://www.apollographql.com/docs/react/">Apollo Client with react-apollo</a> to build Galaxy’s UI, and I wanted the control panel to automatically update to show the state of any migrations. To do that, I had to decide how often the GraphQL query would poll our server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d5k-LRupMuVqVBnqvlvviQ.jpeg" /><figcaption><a href="https://www.flickr.com/photos/59337469@N07/5432665289/in/photolist-9h4Q7V-8hxH3-6goMKZ-iCwSu9-a4EhJ1-WVAVyA-9STPDJ-Tg7gVn-7VkE2w-7EkcrR-j1kcX-pCD9wU-cCHJQN-6LV5ht-4RHW7b-6C7soE-8s4hyy-BWLN2-X79PG-9SsEgm-6cfWAX-WRgpm3-6Vjrjh-7Fyq5v-T6P94p-YNMG6b-62xk1s-8zMMiE-spFQYX-G2hMTK-DeFb4d-71jap-TThS7a-dHamd5-AXv58e-caXmuy-21RVhPE-D5brZh-3nZmYR-AnRMU-4G6Jkt-64YZ5y-oG1gRf-uPdbzh-Rc8Hg5-Zftu9n-8V9ehf-kCFz-uefEd6-gGwVn">Photo credit to themtube2 on Flickr.</a></figcaption></figure><p>Now, we’re not usually running any migrations, so a nice, slow polling interval like 30 seconds seemed reasonable. But in the rare case where a migration <em>is</em> running, I wanted to be able to see much faster updates on its progress.</p><h4>Setting the poll interval from the result of a query</h4><p>It turns out there’s an easy pattern with Apollo Client and react-apollo to let the poll interval be determined by the data returned by the query itself. I had to figure it out for myself, so I thought I’d share it here to save others the work! I think it’s easier to understand if I use some utilities from the great <a href="https://github.com/acdlite/recompose/blob/master/docs/API.md">recompose library</a>, but you can implement this with the basic React API as well.</p><p>The key to this is knowing that the <a href="https://www.apollographql.com/docs/react/basics/queries.html#options-from-props">options parameter to react-apollo’s main </a><a href="https://www.apollographql.com/docs/react/basics/queries.html#options-from-props">graphql function</a> can itself be a function that depends on its incoming React props. (The options parameter describes the options for the query itself, as opposed to React-specific details like what property name to use for data.) We can then use recompose&#39;s <a href="https://github.com/acdlite/recompose/blob/master/docs/API.md#withstate">withState</a> to set the poll interval from a prop passed in to the graphql component, and use the <a href="https://reactjs.org/docs/react-component.html#componentwillreceiveprops">componentWillReceiveProps</a> React lifecycle event (added via the recompose <a href="https://github.com/acdlite/recompose/blob/master/docs/API.md#lifecycle">lifecycle</a> helper) to look at the fetched GraphQL data and adjust if necessary.</p><p>Here’s how it all fits together:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a1830c51de8e1295eca63a1d9d533fbd/href">https://medium.com/media/a1830c51de8e1295eca63a1d9d533fbd/href</a></iframe><p>Note that we check the current value of pollInterval before changing it, because by default in React, nested components will get re-rendered any time we change state, even if you change it to the same value. You can deal with this using <a href="https://reactjs.org/docs/react-component.html#shouldcomponentupdate">componentShouldUpdate</a> or <a href="https://reactjs.org/docs/react-api.html#reactpurecomponent">React.PureComponent</a>, but in this case it’s straightforward just to only set the state when it’s actually changing.</p><p>Using this pattern successfully requires at least version 2.0.3 of apollo-client, as earlier versions had a <a href="https://github.com/apollographql/apollo-client/issues/2569">bug</a> related to changing pollInterval.</p><p>I hope others find this pattern as useful as I did! This sort of feature is why I find Apollo to be the most delightful way to get data into my apps, even independently of the advantages of GraphQL itself.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F64a355%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2F64a355%2F&amp;image=https%3A%2F%2Fucarecdn.com%2F83c581fe-a404-4dd3-b60c-ad9f5cb4b6ef%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/31f4836948a9fc1a46f3f7f0769b75d9/href">https://medium.com/media/31f4836948a9fc1a46f3f7f0769b75d9/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb36e390d250" width="1" height="1" alt=""><hr><p><a href="https://medium.com/apollo-stack/dynamic-graphql-polling-with-react-and-apollo-client-fb36e390d250">Dynamic GraphQL polling with React and Apollo Client</a> was originally published in <a href="https://medium.com/apollo-stack">Apollo GraphQL</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[New in Galaxy: Gradual client transitions during deploys]]></title>
            <link>https://blog.meteor.com/new-in-galaxy-gradual-client-transitions-during-deploys-fa78f4505df6?source=rss-228e21ff506a------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa78f4505df6</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[meteor]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[web-hosting]]></category>
            <dc:creator><![CDATA[David Glasser]]></dc:creator>
            <pubDate>Thu, 16 Nov 2017 21:06:00 GMT</pubDate>
            <atom:updated>2017-11-16T21:06:00.751Z</atom:updated>
            <content:encoded><![CDATA[<h4>Avoid overloading your servers while rolling out new versions</h4><p>We’ve just rolled out a feature in Galaxy to allow containers to clean up resources as they are stopped, and we’ve published a package to allow Meteor apps to easily use this feature to gradually close client connections during deploy to avoid spikes of traffic to new containers. Read on for more detail on the feature who might find this useful.</p><h4>Avoiding CPU usage spikes</h4><p>When you deploy a new version of your Meteor app to Galaxy, we’ve always used a rolling restart to transition clients connected via Meteor’s Websocket-based DDP protocol from old containers to new containers. This means that all clients connected to a single container moved to new containers simultaneously when that container finishes shutting down and clients reconnect.</p><p>Some of our larger customers have found that this can lead to a large spike in CPU usage in their containers and database as many Livequery publications are started at once. Many of our users have found that transitioning their data layer to <a href="https://www.apollographql.com/">Apollo GraphQL</a> from DDP/Livequery has reduced the statefulness of their servers and helped with these performance issues. But we know that many of you still enjoy using DDP/Livequery, so we built this feature to help you avoid these spikes during deploys and other container restarts.</p><p>Starting today, when Galaxy stops an app container (for example, because you’ve deployed a new version, or because we’re upgrading the underlying hardware), it will first send your container a SIGTERM signal and wait 30 seconds before killing the container. You can adjust that grace period from 10 seconds to 10 minutes on your app’s settings page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V3M_0nAK5fQmqdW1m7aCOA.png" /></figure><p>We’ve published an npm package called <a href="https://www.npmjs.com/package/@meteorjs/ddp-graceful-shutdown">@meteorjs/ddp-graceful-shutdown</a> which you can easily add to any Meteor app (as long as you’re on at least Meteor 1.4). This package tracks incoming client connections on your server, and closes them one at a time, evenly spread out across your app’s grace period. Assuming the feedback is positive, we will likely make this be the default behavior of a future release of Meteor.</p><p>We hope this helps our larger users avoid overloading their servers when rolling out new versions!</p><h4>One more thing: Improved Node 8 support for performance tuning</h4><p>While we were improving our container environment to allow apps to receive signals, we’ve also updated the way that you can specify specific flags to Node in Galaxy, such as the V8 garbage collection flags that <a href="http://galaxy-guide.meteor.com/scaling.html">we recommend for performance</a>. We now allow you to set these flags with the environment variable $GALAXY_NODE_OPTIONS as well as $NODE_OPTIONS, because Node 8 (which ships with Meteor 1.6) interprets the latter variable itself but exits with an error if it contains any of the V8 GC flags.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa78f4505df6" width="1" height="1" alt=""><hr><p><a href="https://blog.meteor.com/new-in-galaxy-gradual-client-transitions-during-deploys-fa78f4505df6">New in Galaxy: Gradual client transitions during deploys</a> was originally published in <a href="https://blog.meteor.com/">Meteor Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Download your deployed Galaxy apps with one click]]></title>
            <link>https://blog.meteor.com/download-your-deployed-galaxy-apps-with-one-click-647a18c42a98?source=rss-228e21ff506a------2</link>
            <guid isPermaLink="false">https://medium.com/p/647a18c42a98</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[meteorjs]]></category>
            <category><![CDATA[web-hosting]]></category>
            <category><![CDATA[meteor]]></category>
            <dc:creator><![CDATA[David Glasser]]></dc:creator>
            <pubDate>Tue, 08 Aug 2017 18:54:06 GMT</pubDate>
            <atom:updated>2017-08-08T18:54:06.527Z</atom:updated>
            <content:encoded><![CDATA[<p>You can now download a built archive of every deployed version of your app, directly from your <a href="https://blog.meteor.com/easily-restore-prior-versions-in-galaxy-ff94d5d519fe">app’s “versions” tab</a>. Just select the version you’d like to download and click the “download” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n1GUVd3p5lZ-25q-4rmc9A.png" /></figure><p>Note that this isn’t your app’s original source code (which is never uploaded to Galaxy), so this isn’t a replacement for using a version control system for your code; it’s the built version, which has a different filesystem layout and may have client code minified for production.</p><p>You can use this feature to inspect the contents of different deployed versions, and also recover versions of your code you have deployed in the past. Together with the recently released <a href="https://blog.meteor.com/easily-restore-prior-versions-in-galaxy-ff94d5d519fe">ability to revert to previous versions</a>, developers now have a lot more insight and control into application versions on Galaxy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=647a18c42a98" width="1" height="1" alt=""><hr><p><a href="https://blog.meteor.com/download-your-deployed-galaxy-apps-with-one-click-647a18c42a98">Download your deployed Galaxy apps with one click</a> was originally published in <a href="https://blog.meteor.com/">Meteor Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Logging infrastructure changes in Galaxy]]></title>
            <link>https://blog.meteor.com/logging-infrastructure-changes-in-galaxy-cae89f4f5575?source=rss-228e21ff506a------2</link>
            <guid isPermaLink="false">https://medium.com/p/cae89f4f5575</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[web-hosting]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[meteorjs]]></category>
            <dc:creator><![CDATA[David Glasser]]></dc:creator>
            <pubDate>Tue, 28 Feb 2017 17:20:01 GMT</pubDate>
            <atom:updated>2017-02-28T17:20:01.245Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, we’re starting to slowly roll out some infrastructure changes to how Galaxy runs containers and collects logs from them. These changes will enable some exciting new Galaxy features and improve the reliability of log collection, such as ensuring that the final logged lines before a container crash always get sent to Galaxy’s log servers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1W88u4dNi58SWHTYZ6OhQw.png" /></figure><p>Today’s rollout does not restart any containers; we’ll apply the new configuration only to new containers. Based on our testing, we don’t expect that anyone will notice any major differences in their apps. However, if you do see any new problems with your app, especially related to logs, please file a support ticket to let us know. In the unlikely case that the new configuration prevents your app from working properly, you can turn it off for now by setting the GALAXY_LOGGER <a href="http://galaxy-guide.meteor.com/environment-variables.html">environment variable</a> to container in your app’s settings.json.</p><p>We’re looking forward to sharing the new features enabled by this new configuration soon!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cae89f4f5575" width="1" height="1" alt=""><hr><p><a href="https://blog.meteor.com/logging-infrastructure-changes-in-galaxy-cae89f4f5575">Logging infrastructure changes in Galaxy</a> was originally published in <a href="https://blog.meteor.com/">Meteor Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to stop Ubuntu Xenial from randomly killing your big processes]]></title>
            <link>https://blog.meteor.com/how-to-stop-ubuntu-xenial-from-randomly-killing-your-big-processes-4a3e2d09323f?source=rss-228e21ff506a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a3e2d09323f</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[David Glasser]]></dc:creator>
            <pubDate>Thu, 09 Feb 2017 18:11:32 GMT</pubDate>
            <atom:updated>2017-02-20T08:09:09.640Z</atom:updated>
            <content:encoded><![CDATA[<h4>For the past month, the Out of Memory killer has been out of control.</h4><p>[Update on February 20th: As predicted below, the fix has now been released to Xenial; upgrade to it with apt-get update &amp;&amp; apt-get upgrade.]</p><p><strong>If you’re using Ubuntu Xenial and </strong><strong>uname -r prints out something between </strong><strong>4.4.0-58 and </strong><strong>4.4.0-62 (inclusive), your kernel may incorrectly kill big processes even when there’s plenty of memory available.</strong> Read on to learn more about it and how to fix it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*Bstf8NsMo1ma_XLlZg7sQg.png" /><figcaption>You know it’s a good day when you’re staring at kernel stack traces.</figcaption></figure><p>Here at Meteor Development Group, we do our best to keep our systems up to date with the latest security patches. Galaxy, our hosting service for Meteor apps, runs user apps on Ubuntu Linux. We use the most recent “Long Term Support” distribution: <a href="https://en.wikipedia.org/wiki/Ubuntu_version_history#Ubuntu_16.04_LTS_.28Xenial_Xerus.29">16.04 LTS, also known as Xenial Xerus</a>. And we keep up to date with <a href="https://www.ubuntu.com/usn/">security patches</a>, especially for exploitable bugs in the Linux kernel.</p><p>With any software, updating frequently runs the risk of bringing in new bugs along with the desired bug fixes. The kernel team at Ubuntu does a great job of keeping the kernel versions they release stable by only backporting important bug fixes, but just as with any release engineering process, once in a blue moon a new bug shows up with a bug fix. One of these rare problems happened in early January.</p><h3>An out of control OOM killer</h3><p>Right now, the default Linux kernel on a Xenial system contains a <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1655842">nasty bug</a>.</p><p>When a Linux system runs out of usable memory, a system called the “OOM killer” (for “Out Of Memory”) kills big processes until there’s enough memory to keep going. A healthy Linux system tends to have very little completely free memory: leaving RAM chips completely unused is wasteful, and the kernel will happily fill it with caches, especially of filesystem data. When you run low on memory, the kernel first frees memory in its caches; the OOM killer only kicks in if this isn’t good enough.</p><p>Unfortunately, a bug was recently introduced into the allocator which made it sometimes not try hard enough to free kernel cache memory before giving up and invoking the OOM killer. In practice, this means that at random times, the OOM killer would strike at big processes when the kernel tries to allocate, say, 16 kilobytes of memory for a new process’s thread stack — even when there are many gigabytes of memory in reclaimable kernel caches!</p><p>In particular, the bug occurs when the kernel attempts a so-called “higher order” allocation, meaning an allocation of more than one contiguous page (a “page” of memory on x86 is 4kb). Most allocations are for a single page at a time, so the bug manifests rarely, but kernel stacks require a contiguous 16k allocation, so the bug occurs most frequently when fork()ing a new process.</p><h3>Monitoring and debugging</h3><p>This hit us hard at Galaxy. We started noticing large hosted apps being killed even though the machines seemed to have plenty of memory. Fortunately, our overall system functioned and restarted the apps automatically, but our users weren’t happy to see unexpected and unexplained process deaths. I wrote a <a href="https://github.com/meteor/datadog-oom-journald">custom check</a> for the <a href="https://www.datadoghq.com/">Datadog monitoring service</a> so I could see how often the OOM killer was striking and so I could tell if my attempted fixes were working.</p><p>At first, I operated under the assumption that we were doing something wrong. Maybe we just needed to run fewer apps on each machine, even though the rest of our monitoring showed plenty of room? Maybe some app was doing something very strange to fill up lots of kernel caches with unfreeable data? With some tips from my friend <a href="https://blog.nelhage.com/">Nelson</a>, I figured out exactly what kernel allocation was failing, and eventually found the right search terms to find an Ubuntu bug report.</p><p>I immediately added a comment with some of the search terms I had tried days before (like copy_process, alloc_kmem_page_node, and “slab reclaimable”) that failed to find the bug. I recommend this practice for helping other people who are in the same boat as you. (Or you can write a blog post!)</p><h3>Xenial users are still affected!</h3><p>On Ubuntu Xenial, a kernel containing this bug was published to the main “updates” repository on <a href="https://launchpad.net/ubuntu/+source/linux/4.4.0-59.80/+publishinghistory">January 10th in kernel version 4.4.0–59.80</a>, in order to fix <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1647400">a different bug</a>. Within a few days, a user <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1655842">reported the bug</a>. That day, a member of the Ubuntu kernel team tracked down the buggy kernel commit. The bug had already been fixed in the upstream kernel in a newer branch, as another user noted the next day. It took a little bit of work to backport the fix to 4.4, but the fix was ready to go by the end of January.</p><p>The Ubuntu kernel team generally doesn’t rush out new kernels without testing, so as of today, this fix is still being validated. <strong>The fixed kernel won’t be the default kernel until at least February 20th. </strong>That means if you upgrade a Xenial machine today, it’ll get an affected kernel!</p><h3>Checking and fixing your system</h3><p>You can tell if you’re running a bad version by running uname -r, which will print something like 4.4.0-57-generic. In this version number, 4.4.0 is the “upstream” version number, chosen by the kernel project itself. -57 is a revision specific to Ubuntu’s packaging. generic is a <a href="http://askubuntu.com/questions/401410/what-exactly-is-generic-version-of-ubuntu-how-it-differes-from-other-versions">particular “flavor” of how Ubuntu builds kernels</a>; you might also see server or virtual or lowlatency.</p><p>Any 4.4.0 kernel up to -57 is OK; the bug was added in -58. When this blog post was originally written, -62 was the <a href="https://launchpad.net/ubuntu/+source/linux/4.4.0-62.83/+publishinghistory">published version</a>, and it still has the bug. After this blog post was originally written , the fix was published in -63. As far as I know, the only Ubuntu distribution that ever had a version with this bug is Xenial.</p><p>If you’re running a bad version and you want to avoid this bug, you should just upgrade to the newest version by running apt-get update &amp;&amp; apt-get upgrade.</p><p>(Before February 20th, you had two options. You could run the “proposed” version by <a href="https://wiki.ubuntu.com/Testing/EnableProposed">enabling access to proposed repository</a>. This gets you the latest version with all known security fixes, but hasn’t had nearly as much testing as older kernel versions. Alternatively, you could roll back to the last good version before the bug was introduced. (This will re-introduce the <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1647400">older bug</a> that the buggy commit was intended to fix, though!) This is pretty straightforward. Check uname -r to see what flavor of kernel you’re using, and run sudo apt-get install linux-image-4.4.0-57-generic, replacing generic with your kernel’s flavor. Then restart your machine.)</p><p><em>Do you enjoy investigating strange problems, whether as low-level as Linux kernel virtual memory bugs or as high-level as distributed application scheduler optimization? Join us at MDG as a </em><a href="http://jobs.meteor.com/#9de2d23b-fd3c-421e-92b1-26203c60f1b1"><em>Cloud Systems Engineer</em></a><em>, or one of </em><a href="http://jobs.meteor.com/"><em>many other roles</em></a><em>.</em></p><p><em>Do you hate the idea of having to worry about kernel bugs? So do the rest of our </em><a href="https://www.meteor.com/hosting"><em>Galaxy app hosting customers</em></a><em>. We take care of all of this so you don’t have to.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a3e2d09323f" width="1" height="1" alt=""><hr><p><a href="https://blog.meteor.com/how-to-stop-ubuntu-xenial-from-randomly-killing-your-big-processes-4a3e2d09323f">How to stop Ubuntu Xenial from randomly killing your big processes</a> was originally published in <a href="https://blog.meteor.com/">Meteor Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Protect your database: Galaxy supports IP whitelisting!]]></title>
            <link>https://blog.meteor.com/protect-your-database-galaxy-supports-ip-whitelisting-f5a84e165c62?source=rss-228e21ff506a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5a84e165c62</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[web-hosting]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[meteor]]></category>
            <dc:creator><![CDATA[David Glasser]]></dc:creator>
            <pubDate>Thu, 02 Feb 2017 20:26:55 GMT</pubDate>
            <atom:updated>2017-02-02T20:35:02.900Z</atom:updated>
            <content:encoded><![CDATA[<p>Over the last month, we’ve rolled out a few improvements to Galaxy to help you keep your database secure and make it easier to notice when our infrastructure is being upgraded. Read on to hear about added support for IP whitelisting, a new, in-app system status, and improved docs for DNS and SSL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*ndod1JzVZSPun9v6Eos7Iw.jpeg" /><figcaption>Image source: <a href="https://www.uniprint.net/img/media/chrome-os-printing-google-cloud-security-risk.jpg">https://www.uniprint.net/img/media/chrome-os-printing-google-cloud-security-risk.jpg</a></figcaption></figure><h4>Protect your database with IP whitelisting</h4><p>Most Meteor apps running on Galaxy need to access services like databases that don’t need to be accessible to everyone in the world. While it’s important to use encrypted connections and good password hygiene, lots of security breaches can be prevented simply by preventing arbitrary devices from opening a connection to your database in the first place.</p><p>The simplest way to do this is to configure your database with an IP whitelist: a set of Internet addresses that are the only machines allowed to connect to the database. But this requires that you only run your services on a fixed set of machines! On modern scalable apps on container-based infrastructure, you may need to run your app on a different set of machines from one day until the next. Until now, Meteor developers running their apps on Galaxy haven’t been able to take advantage of IP whitelisting. Fortunately, this has changed.</p><p><strong>As of now, all outgoing traffic from your Galaxy apps will appear to come from a fixed group of IP addresses.</strong> If your database host supports IP whitelisting (for example, <a href="http://docs.mlab.com/security/#whitelisting-ip-addresses">mLab</a> and <a href="https://help.compose.com/docs/deployments-whitelists">Compose</a> both do for MongoDB), you can enable it today in production. See the <a href="http://galaxy-guide.meteor.com/container-environment.html#network-outgoing">Galaxy Guide</a> for more details and the precise list of IP addresses.</p><p>While we’re excited to offer IP whitelisting, please remember that it’s only a defense-in-depth strategy, and is no replacement for the use of encryption and good passwords. After all, these IP addresses are shared with your fellow Galaxy customers. We’ve begun enabling clusters of dedicated machines for avid Galaxy users who want even more protection.</p><h4>See system status in the Galaxy dashboard</h4><p>We were happy that the infrastructure changes necessary to support IP whitelisting earlier this week required doing a zero-downtime restart of all user apps. Even though our rolling restarts shouldn’t cause downtime, we do know that developers want to know when to expect container restarts, so we always announce our scheduled maintenance periods on the <a href="http://status.meteor.com/">Meteor status page</a>. But we know that it’s not always easy to remember to check the status page, so…</p><p><strong>As of December, the main Galaxy app has an unmissable red bar at the top of every page whenever the status page is reporting an ongoing incident or scheduled maintenance period.</strong> As always, you can also subscribe to status page updates via email, SMS, webhook, or RSS.</p><h4>Improved documentation for DNS and SSL</h4><p>While you’re taking a look at the IP whitelisting section of the Galaxy Guide, check out other improvements we’ve made recently, especially around setting up <a href="http://galaxy-guide.meteor.com/dns.html">DNS and SSL for root domains</a> like example.com. Our docs are developed in the open, so you can always watch for new additions and send in suggested improvements through pull requests on <a href="https://https//github.com/meteor/galaxy-docs">the GitHub repository</a>.</p><p>We’ve got a number of exciting features planned for 2017 based on your feedback, so we thank you for using Galaxy and look forward to continue helping you make great things with Meteor!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5a84e165c62" width="1" height="1" alt=""><hr><p><a href="https://blog.meteor.com/protect-your-database-galaxy-supports-ip-whitelisting-f5a84e165c62">Protect your database: Galaxy supports IP whitelisting!</a> was originally published in <a href="https://blog.meteor.com/">Meteor Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are we 100% committed to this?]]></title>
            <link>https://medium.com/@glasser/are-we-100-committed-to-this-ee4e9021d23f?source=rss-228e21ff506a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee4e9021d23f</guid>
            <dc:creator><![CDATA[David Glasser]]></dc:creator>
            <pubDate>Wed, 25 Jan 2017 17:20:44 GMT</pubDate>
            <atom:updated>2017-01-25T17:20:44.474Z</atom:updated>
            <content:encoded><![CDATA[<p>Are we 100% committed to this?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee4e9021d23f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reads odd to me since you haven’t said what the question is]]></title>
            <link>https://medium.com/@glasser/reads-odd-to-me-since-you-havent-said-what-the-question-is-3608436cbe17?source=rss-228e21ff506a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3608436cbe17</guid>
            <dc:creator><![CDATA[David Glasser]]></dc:creator>
            <pubDate>Wed, 25 Jan 2017 17:20:18 GMT</pubDate>
            <atom:updated>2017-01-25T17:20:18.670Z</atom:updated>
            <content:encoded><![CDATA[<p>Reads odd to me since you haven’t said what the question is</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3608436cbe17" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>