惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
Recent Announcements
Recent Announcements
GbyAI
GbyAI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Microsoft Azure Blog
Microsoft Azure Blog
N
Netflix TechBlog - Medium
人人都是产品经理
人人都是产品经理
MongoDB | Blog
MongoDB | Blog
D
DataBreaches.Net
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
U
Unit 42
腾讯CDC
D
Docker
The GitHub Blog
The GitHub Blog
阮一峰的网络日志
阮一峰的网络日志
Vercel News
Vercel News
I
InfoQ
Jina AI
Jina AI
爱范儿
爱范儿
宝玉的分享
宝玉的分享
博客园 - Franky
G
Google Developers Blog
P
Proofpoint News Feed

OSU Open Source Lab

Data Center Migration Update and Fundraising Campaign | OSU Open Source Lab OSL Infrastructure Migration: A Move to Oregon's State Data Center | OSU Open Source Lab Featured: Strong support stabilizes funding for the Open Source Lab | OSU Open Source Lab We're Hiring: Join the OSU Open Source Lab as a Student Systems Engineer! | OSU Open Source Lab Forging Our Future: OSL's Path to Sustainability – A Call for Smart Solutions and Enduring Support | OSU Open Source Lab Future of OSL in Jeopardy | OSU Open Source Lab Now Providing Access to POWER10 for Open Source Projects | OSU Open Source Lab FTP Server Rebuild - March 2024 | OSU Open Source Lab On Leaving the Open Source Lab, Jonathan Frederick | OSU Open Source Lab Reflections on My Time at the Open Source Lab, Travis Whitehead | OSU Open Source Lab OSL Alumnus Matthew Johnson on working at Tesla | OSU Open Source Lab Hiring two DevOps student positions | OSU Open Source Lab TDS Telecom Support of OSU Open Source Lab Tops $5 Million | OSU Open Source Lab Goodbye Letter from Graduating Senior, Cody Holliday | OSU Open Source Lab Mohamed Eldebri on OSL's participation in the Corvallis Maker Fair | OSU Open Source Lab Cody Holliday on the Department of Energy Cyber Defense Competition 2018 | OSU Open Source Lab OSL's Cody Holliday Wins Regional DOE Cyber Defense Competition | OSU Open Source Lab OSL Alumnus Alex Plovi sells CoreOS to RedHat | OSU Open Source Lab Changing the World, One Line of Code at a Time | OSU Open Source Lab Jonathan Frederick on Packer Templates project at the OSL | OSU Open Source Lab Ganeti Production Rebuild - Dec 11-15 & 18-19, 2017 | OSU Open Source Lab Thank You for Supporting our Crowdfunding Campaign! | OSU Open Source Lab A Message from the Director | OSU Open Source Lab New Project: polr | OSU Open Source Lab Donate to Our Crowdfunding Campaign! | OSU Open Source Lab Cody Holliday on Why we should stop using C | OSU Open Source Lab Amanda Kelner on Graduating | OSU Open Source Lab Beaver BarCamp 17: New Horizons | OSU Open Source Lab New Project: libpng Now Mirrored on ftp.osuosl.org | OSU Open Source Lab Network Outage 2016-12-17 Post-mortem | OSU Open Source Lab
Google Migration Post-mortem | OSU Open Source Lab
2014-07-03 · via OSU Open Source Lab

by Justin Dugger on Thu, Jul 03 2014

Google Migration Post Mortem

OSU administration recently approached the OSL asking us to help migrate their email archives to Google. Through contacts with other local universities that had made the switch recently, we discovered that Portland State University had written and published an open source Python app to manage the process. In the name of expedience, we decided to fork that project and use that as our base from which to extend.

Having had time to reflect, I’d like to share a few lessons from the experience:

  1. Enterprise means customized. All software comes bundled with biases and assumptions; small teams may be better off adapting their organization to fit those assumptions, but there exists a threshold beyond which it is easier to adjust software to fit the organization’s assumptions instead. Despite forking a completed application, we found ourselves making several customizations and undoing several assumptions made by upstream developers.

    It was constantly tempting to rewrite and generalize the software, but data migration in particular is usually only done once, so any benefits from investments made into code quality will mainly accrue to those that come after us. Instead of aiming for perfection, we settled on good enough to meet the client’s needs, while leaving the app better off than we found it. We formalized Python library dependencies using pip, ported the application to the latest Django version, and adopted some Django app organizational practices from Mozilla.

  2. Pace your app. 3rd party APIs, including Google, rate limit requests to prevent people like us from accidentally DDoSing their systems… kind of. The main limit is one mail per second per inbox. The clever engineer will recognize that with tens of thousands of inboxes, we can still push several thousand emails to Google per second, so long as the app is parallelized wisely.

    The app we selected used a task queue with worker nodes pulling from it. Syncing one inbox is a task, so we have n concurrent inbox sync tasks running in parallel. This design is simple to scale up/down, and properly divides up the work with the API’s rate limit in mind. Task queues are a good model, and one I’ve used before for this sort of task, so we left the architecture alone.

    It was a good chance to learn about RabbitMQ deployment specifics and monitoring tools; unfortunately what I discovered was that most tools are instrumented for tasks per second while our application was best measured in tasks per hour. This wasn’t a huge problem, but it meant that I had to write my own instrumentation to estimate how long syncing all users might take, or how many extra worker nodes to spin up to meet any given deadline.

  3. Config management FTW. Especially for one-off apps that you don’t expect to live long, it can be tempting to set up a VM and get it working, then just clone it into production a couple of times. It certainly makes the initial deploy simple, but making changes becomes difficult once you discover you need to scale up to several dozen worker VMs.

    I think most sysadmins understand that config management works well for high scale web environments at Google, Facebook or Amazon. What is lost on many sysadmins is how configuration management tools are also useful for collaboration. By using configuration management tools that treat the infrastructure like code, a new strategy emerges: manage ops like one manages devs. You provide them with a number of tools: revision control, production/development branches, peer review, etc. From this perspective, Chef and Puppet make all kinds of sense. It’s also great at documenting how your infrastructure is set up for coworkers.

    Or yourself, six months later:

    “Any software project is a collaborative project. It has at least two developers, the original developer and the original developer a few weeks or months later when the train of thought has long left the station.” —Peter Hutterer

    Until you’ve tried it, you have no idea how useful it is to be able to run git grep on your infrastructure. It’s quite useful to know all the places that your infrastructure references a specific server you need to take offline, or what the Apache configuration looked like back before you tried to integrate LDAP authentication with the SVN repo.

So having learned and applied these lessons, what did we accomplish? By mid December, roughly half of the student population had opted into the Google apps domain. This greatly reduced the time spent during the last weekend of December for the final sync of approximately 24k remaining inboxes. OSU Helpdesk was also happy with the gradual migration; infrastructure changes implemented all at once lead to large temporary increases in calls, and makes staffing and scheduling much harder.