It allows us to ship data anywhere and it is a core part of the design that supports our high-availability as well as product acceleration and development (side fact: it is why the product is code named ELE.).įor a production system, wholesale switching is never a great idea, so we decided to take a different approach. Easy experimentation with the data stream is critical to our velocity. With that datastream we can slice, dice and distribute the data to whichever corner of infrastructure we like. We use Facebook’s Scribe software for point-to-point distribution, routing and buffering. Mailgun logs provide an end-to-end view of exactly what happened to each email.īefore looking at how we implemented and rolled out Mailgun, let’s look at how Cloud Monitoring is architecturedĮach step represents one or more distributed services, connected by a data stream. Mailgun can segment all reporting based on tags which makes testing easy.Īccountability – Just sending an email is not enough for us. Sane bouncing – Mailgun offers a rational, API-based way to deal with bounces which happen frequently for lots of different reasons.Īnalytics and tagging – We are constantly testing failure scenarios in our production environment, so we needed a way to isolate certain accounts we’ve marked “special”. We got the benefits we expected and even some we didn’t. When we took Mailgun out for a spin we were very impressed. When we investigated Mailgun, our objective was to reliably enable email notifications for our customers, not master the details of email creation, delivery and analytics, three essential components of email automation at our scale. These emails can be triggered when the website being monitored has timed out, responds with a 404 error, or when some other user-defined condition in your Alarm Language is met. A big part of what Cloud Monitoring does when an error occurs is send an email to the customer. During the Rackspace acquisition of Mailgun, we had a unique opportunity to test out Rackspace’s newest set of services in our Cloud Monitoring product. We believe that when we use our own products, we build better software for our customers because we can provide feedback to the team sitting right across the hallway. The engineering team at Rackspace is always looking for ways to use Rackspace products in the solutions that we build for customers. Before leading the Cloud Monitoring engineering team, Dan co-founded Cloudkick, a Y-Combinator startup focused on monitoring cloud infrastructure that was acquired by Rackspace in 2010. Cloud Monitoring lets you monitor any server in any data center so that you can always make sure that your application infrastructure is a-ok. In the future we might cover PM2’s cluster mode, remote process management and more.This post is written by Dan Di Spaltro, Director of Product for Rackspace Cloud Monitoring. □ PM2 does a lot of things, most of which are out of the scope of this brief introduction. Now, when our system restarts, PM2 will start whatever processes we had running when we ran pm2 save. Successfully saved in C: \Users \moose \.pm2 \dump.pm2 Start whatever you want to have running all the time through pm2 start and then run pm2 save. PM2 also allows us to start our processes when our server (re)starts. To make PM2 watch our directory and restart on file changes, include the -watch flag when you start your app. Restarting on File ChangesĪnother awesome feature that PM2 has is restarting when a file in the working directory changes. Awesome! Your app is now running under PM2, if it crashes, PM2 will restart it. If you want to add a name to the process when you start it, you can use the -name parameter ( pm2 start app.js -name mycoolapp). PM2 will output something like this: Starting C: \Users \moose \app.js in fork_mode ( 1 instance ) Done. App being the name of the file you’re running. To start a process under PM2, all you have to do is run pm2 start. Let’s get into the basics of how to use it. Restart-Persistance: PM2 can remember all your processes and restart them after a system restartįirst thing we need to do is to install PM2 globally on your machine: $ npm i -g pm2.It doesn’t just run Node apps: PM2 isn’t limited to just Node.js processes, that’s right, you can even use it to keep your Minecraft server online.Monitoring and managing processes remotely: A magic-powered web portal allows you to keep an eye on remote processes and manage them.Restarting after crashes: PM2 allows us to keep processes running until the heat death of the universe, or a server failure, whichever happens first.PM2 has a lot of uses, let’s look at a few: PM2, or Process Manager 2 is an incredibly versatile production process manager written in Node.js.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |