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

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
CXSECURITY Database RSS Feed - CXSecurity.com
D
Docker
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
Jina AI
Jina AI
小众软件
小众软件
Last Week in AI
Last Week in AI
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
宝玉的分享
宝玉的分享
美团技术团队
爱范儿
爱范儿
V
V2EX
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
J
Java Code Geeks
博客园 - 司徒正美
博客园 - 叶小钗
S
SegmentFault 最新的问题
量子位
S
Secure Thoughts
月光博客
月光博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
O
OpenAI News
L
LINUX DO - 最新话题
罗磊的独立博客
SecWiki News
SecWiki News
雷峰网
雷峰网
Recent Announcements
Recent Announcements
V2EX - 技术
V2EX - 技术
T
Tailwind CSS Blog
H
Hacker News: Front Page
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
云风的 BLOG
云风的 BLOG
Schneier on Security
Schneier on Security
T
The Blog of Author Tim Ferriss
IT之家
IT之家
博客园 - 聂微东
腾讯CDC
N
News | PayPal Newsroom
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
Hacker News: Ask HN
Hacker News: Ask HN
aimingoo的专栏
aimingoo的专栏
Webroot Blog
Webroot Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
K
Kaspersky official blog

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 OSL Summer 2016 Internship | OSU Open Source Lab The OSL at PyCon | OSU Open Source Lab Congratulations 2016 Graduates! | OSU Open Source Lab RTEMS | OSU Open Source Lab CASS and the AllSeen Alliance | OSU Open Source Lab DevOps DayCamp 2015 | OSU Open Source Lab OSL GSOC 2015 - Oregon's Catch | OSU Open Source Lab OSL GSOC 2015 - Protein Geometry Database | OSU Open Source Lab Write the Docs '15 | OSU Open Source Lab Coming Soon: Beaver BarCamp 15 | OSU Open Source Lab SCALE x13 | OSU Open Source Lab A Successful DevOps DayCamp | OSU Open Source Lab Using Variables in a Custom Drupal Theme | OSU Open Source Lab DevOps DayCamp | OSU Open Source Lab Make Bash, Not War | OSU Open Source Lab A Recap of OSCON 2014 | OSU Open Source Lab Google Migration Post-mortem | OSU Open Source Lab Vim Trick FTW! | OSU Open Source Lab OpenStack on OpenPOWER | OSU Open Source Lab Protein Geometry - What the Heck is That? | OSU Open Source Lab Openstack's Horizon | OSU Open Source Lab DevOps Bootcamp Extends OSL Reach | OSU Open Source Lab 10 Projects Making a Difference | OSU Open Source Lab Connecting at Beaver BarCamp 12 | OSU Open Source Lab Top 10 Projects Impacting the Open Source Community | OSU Open Source Lab Top 10 Milestones | OSU Open Source Lab A Look Back at Beaver BarCamp 1 | OSU Open Source Lab OSL Announces 10 year Celebration; Attends OSCON | OSU Open Source Lab Open Source Bridge Promotes Community | OSU Open Source Lab OSL to Mentor Four in Google Summer of Code | OSU Open Source Lab OSL Staff Participate at DrupalCon 2013 | OSU Open Source Lab OSL's April 2013 Newsletter | OSU Open Source Lab Students & Community Members Learn Together at Beaver BarCamp 11 | OSU Open Source Lab OSL to Participate in Google Summer of Code 2013 | OSU Open Source Lab OSL Staff Mentors International Students Through Google Summer of Code | OSU Open Source Lab Students, Community and Professionals Collaborate at Beaver BarCamp 10 | OSU Open Source Lab From Support to Success | OSU Open Source Lab OSL in the Spotlight at Summer Conferences | OSU Open Source Lab OSL Advances With New Staff Members; Renewed Focus | OSU Open Source Lab Building a Bright Future With DevOps | OSU Open Source Lab Connect With the OSL at OSCON 2012 | OSU Open Source Lab Open Source, Open Future | OSU Open Source Lab Setting the Bar High | OSU Open Source Lab OSL 'Unconference' Approaches | OSU Open Source Lab Highlights From Beaver Barcamp 8 | OSU Open Source Lab Lots of Love from LinuxCon | OSU Open Source Lab All Aboard for Vancouver! | OSU Open Source Lab New Study to Investigate Use of Open Source Software for Securing the Energy Industry | OSU Open Source Lab A Little Love for the LUG | OSU Open Source Lab Highlights from OSCON 2011 | OSU Open Source Lab OSL Talks OSWALD and Ganeti at Open Source Bridge | OSU Open Source Lab OSUOSL Alum Eric Searcy Joins the Linux Foundation as IT Infrastructure Manager | OSU Open Source Lab Out and About with the OSL in June | OSU Open Source Lab Emily on Essentials: Robotics, Open Source and Life as New Student at the OSL | OSU Open Source Lab Special Student Attendee Packages for LinuxCon North America 2011 | OSU Open Source Lab OSL Newsletter - April 2011 | OSU Open Source Lab Visiting Prineville: OSL Tours Facebook's Open Compute Data Center | OSU Open Source Lab OSL Newsletter: A Look Back at 2010 | OSU Open Source Lab CrisisCommons is pleased to announce partnership with OSU's Open Source Lab | OSU Open Source Lab OSU Open Source Lab to assist young students in “Google Code-in” contest | OSU Open Source Lab TeachEngineering Project Receives Award from NSF's National Science Digital Library | OSU Open Source Lab Google Surpasses $1M in Donations to OSUOSL | OSU Open Source Lab OSCON 2009 | OSU Open Source Lab Catch us at Open Source Bridge | OSU Open Source Lab Hackathon at Open Source Bridge | OSU Open Source Lab Hardware Donation Expands OSUOSL Infrastructure | OSU Open Source Lab Flourish! Open Source Conference | OSU Open Source Lab OSUOSL Visit to Japan | OSU Open Source Lab Linux.com finds new home at OSUOSL | OSU Open Source Lab OSU Open Source Lab announces OSL Alliance Corporate Sponsorship Program | OSU Open Source Lab
Mysql1-vip Outage Post-Mortem | OSU Open Source Lab
2015-08-07 · via OSU Open Source Lab

Mysql1-vip Outage Post-Mortem

Background

On July 15th we ran into a number of issues with replication on mysql2 on a couple of session tables. This caused replication to be paused, and a large number of statements had to be skipped. Replication was restarted successfully. On July 16th some more issues with the same tables were encountered, but in far greater number. A ticket was created to track the issue. Replication was restarted several times, but on the week of the 20th a decision was made to entirely reload mysql2 and examine some alternative replication methods (primarily row-based replication).

Our servers, mysql1 and mysql2, are running mysql 5.5. While documentation and tribal knowledge claimed a master-slave replication set-up, they were configured as master-master replication.

What Happened

On July 30th a decision was made to reload mysql2 at 4:00PM PDT to fix replication errors. Slave replication was intentionally stopped. Databases were dropped one at a time on mysql2 with a small delay between each drop.

As mentioned previously, mysql1 and mysql2 were unexpectedly set up in master-master replication configuration. Therefore, though slave replication on mysql2 was stopped, mysql2 was still sending commands to mysql1. This caused databases to be dropped on both machines. Thanks to the script delays we realized after a few minutes that mysql1 was dropping databases and the script was stopped. We then immediately started working to restore the databases.

Why restores took so long

As demand for the mysql cluster has grown, our backup strategy has shifted to be optimized to save disk space, our greatest resource bottleneck. This has been a worthwhile tradeoff in the past, as we have rarely had to do full restores. We use mysql-zrm to back up mysql with heavy compression. Because of this strategy, restores were largely CPU-bound instead of IO-bound.

We also discovered we had a couple of databases that had issues restoring due to indexing and foreign keys. Each time one of these failed, we had to parse the entire backup file (around 200GB), and pull out the bad database to restore separately, and then pull out the rest of the unrestored databases.

A further complication was that our backups were pointed at mysql2, which was out-of-date with mysql1, due to the initial synchronization failures. Fortunately, we had the binary logs from the 17th through the 30th. This means that though most data could be restored, some data from between the 15th and the 17th was lost.

These three factors combined meant a much slower, and much more labor-intensive restore process than we had anticipated.

Looking Forward

We learned a lot of important lessons from this outage, both related to how we run our mysql cluster, as well as how we plan and manage resources at the OSL in general.

Most immediately, some of the most important changes we will implement for the mysql service over the next month or two include:

  1. Evaluating better replication strategies to mitigate the initial cause, including row-based replication

  2. Storing binlogs as a backup on a separate server.

  3. Doing backups using Percona XtraBackup, allowing for much faster full restores

  4. Using mydumper rather than mysql-zrm to improve the speed of our logical backups

  5. Work on our documentation and training for our complex systems, including

    1. Regularly testing full restores as part of our backup process on a spare server

    2. Gather more accurate ETAs for the restoration process

    3. Regularly audit the databases we host – Multiple test and ballooning databases (100GB+) seriously delayed the restore process

  6. Migrate to a bigger, more powerful mysql cluster (already planned before this outage)

In terms of the bigger picture, we recognize that we need to change how the lab plans, monitors, and manages resources and projects. Despite our best efforts, the backlog of hosting requests to the OSL continues to grow. We have, over the years, worked hard to stretch our resources to provide services to as many projects as we can. This has always come with tradeoffs, such as the compression of backups to maximize disk use, and less redundancy than we would have wished.

We have for a while been concerned about how thinly resources have been stretched, and have been working on a set of policy changes, as well as raising funds to reinvest in the lab. Some of you may have heard our staff talk about this plan – we hope to talk to a lot more of you about this in the near future. Our new FTP cluster, perhaps one of our most neglected pieces of infrastructure, was an important first step in this renewal.

Over the next few months, the OSL will be looking at a number of different services and policies, including:

  1. Instituting a policy and mechanisms for better keeping the community informed

    1. Of outages, maintenance, etc.

    2. Of resource use & warning signs (dashboards)

  2. Identifying and redesigning “core” services, including

    1. Defining and monitoring capacity limits

    2. Implementing redundancy and restore practices, including staff drills

    3. Migrating more of these services to Chef

    4. Instituting periodic review of documentation, policies and performance metrics

    5. Finding better ways of leveraging community expertise to supplement our own

  3. Raising funds to refresh our most aging infrastructure, and catch up on the worst of our technical debt.

We want to thank you for your patience and support during this outage and over the years we have served you. We realize that the length of this outage, and the lack of progress reports was unacceptable, and we want you to know that we are taking steps to reduce both the likelihood and the impact of future outages.