October 20, 2021 | Updated: November 8, 2021
저는 지금껏 제 직책 덕분에 다양한 유형의 소프트웨어를 배포할 수 있는 특권을 누렸습니다. CD를 발송했고, 웹을 통해 고객 소프트웨어를 배포했으며, 데이터베이스 인스턴스와 제어 평면을 업데이트했습니다. 그리고 실행 중인 대규모 미션 크리티컬 시스템을 실시간으로 업데이트했습니다.
제가 이것을 특권이라고 부르는 이유는 최종 사용자에게 소프트웨어를 제공하는 것이 소프트웨어 엔지니어가 가장 좋아하는 일이기 때문입니다. 그러나 배포가 게임처럼 재미있기만 한 것은 아닙니다. 그리고 배포를 할 때마다 고유한 문제가 발생하지만, 모든 배포 과정에서 한 가지 공통된 것이 있는데, 바로 두려움입니다.
중요한 소프트웨어의 배포를 담당하는 분이라면 제가 무슨 말을 하는지 잘 아실 것입니다. 배포 담당자는 소프트웨어를 개발하고, 준비하고, 테스트합니다. 그리고 마침내 소프트웨어가 출항하는 날이 오면 프로덕션 환경이라는 바다에서 순조롭게 항해할 수 있기를 바라고 또 기도합니다. 대부분의 회사에서 프로덕션 환경은 개발 및 스테이징 환경과 현저히 다르기 때문에 스테이징 환경에서 작동한 코드가 프로덕션 환경에서도 성공적으로 작동할 것인지는 알 길이 없습니다. 그러나 한 가지 분명한 점은 소프트웨어에 문제가 발생할 경우 모두가 이에 대해 알게 된다는 것입니다. 그래서 두려운 것입니다.
이러한 두려움이 개발자에게 미치는 영향을 가장 잘 이해할 수 있는 말이 있습니다. SF 소설 Dune의 저자인 Frank Herbert는 "두려움은 정신을 집어 삼킨다"고 했습니다. 두려움은 실험적이고 도전적인 정신을 약화시킵니다. 위험을 감수할 의지를 꺾고, 배포를 몇 달씩 미루는 등 나쁜 습관을 가져옵니다. 무엇보다 혁신의 속도를 느리게 만듭니다 (많은 기업들이 지불하고 있는 혁신세에 대한 게시물 참조).
프로덕션 환경에 배포하는 것는 분명 두려운 일입니다. 하지만 저는 지난 30년간 동료들과 협력하여 안전하고 자신 있는 배포 환경을 만들 수 있는 몇 가지 방법을 개발했습니다. 다음에 나오는 이 시리즈의 4개 블로그 게시물에서 각각에 대해 차례로 살펴보겠습니다.
· 180 규칙 - 쉽고 빠르게 롤백이 가능한 자동화된 배포 지원
· Z 배포 - 롤백 실패로 인한 다운타임 제한
· Goldilocks Gauge - 배포의 규모와 빈도를 적절하게 조정
. 거울을 통한 조율 - 개발 환경, 스테이징 환경 및 프로덕션 환경 간의 조율
이러한 방법들은 완벽하지 않으며 배포에 버그가 발생하지 않는다는 것을 보장하지 않습니다. 하지만 제 경험상 최고의 전략입니다. 그리고 의미 있는 혁신이 가능하도록 엔지니어링 팀 내에 자신감 있는 문화를 구축하는 데 도움이 됩니다.
시작을 위해 다음 블로그 게시물에서는 프로덕션 환경에서의 다운타임(분)을 줄이는 데 도움이 되는 "180가지 규칙"에 대해 소개하겠습니다. 그동안 @MarkLovesTech를 통해 안전한 배포를 위한 나만의 팁과 기법을 자유롭게 공유해보세요.
Safe Software Deployments: The 180 Rule
In my last post , I talked about the anxiety developers feel when they deploy software, and the negative impact that fear has on innovation. Today, I’m offering the first of four methods I’ve used to help teams overcome that fear: The 180 Rule. Developers need to be able to get software into production, and if it doesn’t work, back it out of production as quickly as possible and return the system to its prior working state. If they have confidence that they can detect problems and fix them, they can feel more confident about deploying. All deployments have the same overall stages: Deployment: You roll the software from staging to production, either in pieces -- by directing more and more transactions to it -- or by flipping a switch. This involves getting binaries or configuration files reliably to production and having the system start using them. Monitoring: How does the system behave under live load? Do we have signals that the software is behaving correctly and performantly? It’s essential that this monitoring focuses more on the existing functionality than just the “Happy Path” of the new functionality. In other words, did we damage the system through the rollout? Rollback: If there is any hint that the system is not working correctly, the change needs to be quickly rolled back from production. In a sense, a rollback is a kind of deployment, because you’re making another change to the live system: returning it to a prior state. The “180” in the name of the rule has a double meaning. Of course, we’re referring here to the “180 degree” about-face of a rollback. But it’s also a reference to an achievable goal of any deployment. I believe that any environment should be able to deploy software to production and roll it back if it doesn’t work in three minutes, or 180 seconds. This gives 60 seconds to roll binaries to the fleet and point your customers to them, 60 seconds to see if the transaction loads or your canaries see problems, and then 60 seconds to roll back the binaries or configurations if needed. Of course, in your industry or for your product, you might need this to be shorter. But the bottom line is that a failed software deployment should not live in production for more than three minutes. Developers follow these three stages all the time, and they often do it manually. I know what you’re thinking: “How can any human being deploy, monitor, and roll back software that fast?” And that is the hidden beauty of the 180 Rule. The only way to meet this requirement is by automating the process. Instead of making the decisions, we must teach the computers how to gather the information and make the decisions themselves. Sadly, this is a fundamental change for many companies. But it’s a necessary change. Because the alternative is hoping things will work while fearing that they will not. And that makes developers loath to deploy software. Sure, there are a lot of tools out there that help with deployments. But this is not an off-the-shelf, set-it-and-forget-it scenario. You, as the developer, must provide those tools with the right metrics to monitor and the right scripts to both deploy the software and possibly roll it back. The 180 Rule does not specify which tools to use. Instead it forces developers to create rigorous scripts and metrics, and ensure they can reliably detect and fix problems quickly. There’s a gotcha that many of you are thinking of: The 180 Rule is not applicable if the deployment is not reversible. For example, deploying a refactored relational schema can be a big problem, because a new schema might introduce information loss that prevents a roll-back. Or the deployment might delete some old config files that aren’t used by the new software. I’ll talk more about how to avoid wicked problems like these in my subsequent posts. But for now, I’m interested to hear what you think of The 180 Rule, and whether you’re using any similar heuristics in your approach to safe deployment.
Honoring Latine Heritage Month at MongoDB
Heritage and culture sits at the centerfold of human interaction. With a population of more than 650 million people, speaking over 400 different languages, and spanning a geographic area from the tip of Patagonia to the Caribbean, the people of Latin America and the culture of their 33 countries are difficult to condense into one identity. In celebration of Latine Heritage Month, we asked a few Latine MongoDB employees to reflect on their heritage and ultimately how that shapes their work. Tayrin S Riojas , Head of Government Relations and Public Policy I was born in Los Angeles and moved to Mexico City before my third birthday. In my junior year of high school, my family moved back to the United States and ended up in Dallas. I feel so incredibly fortunate to have experienced living in both countries for extended periods of time. I remember high school in the United States feeling like I was in a Hollywood movie — there were big lockers, cheerleaders, and sports teams. However, I felt my friends in Mexico City had a wider variety of social activities compared to the friends I made in the United States. As Mexicans, and in many Latino cultures, we are passionate and socially driven with our families, extended families, and friendships. This is what I personally love most about my culture. We have great traditions and share in them together, from posadas, piñatas, soccer games, and even mourning. This is something that transcends our location, and I feel honored to have been raised with these values. Throughout my career, I have worked in telecommunications, film post-production, healthcare, and the government and held roles such as lobbyist, Senate Committee Consultant, and International Relations Advisor. Tech is at the core of every single one of these opportunities. I am certainly not an engineer, nor can I code anything functional, but I do have a passion for learning about technology. After having my second “COVID baby” and being on parental leave, I decided I wanted to get back into tech. A relative recommended MongoDB, and soon after, I started as a Cloud Account Executive for the Latin America market. I loved talking to our customers, and it taught me so much about the power and versatility of our tech. It was a great role, but I had spent so much time working with the government that I honestly missed it. I truly believe that to excel at what you do, you must have your heart in it. MongoDB is growing fast, and we are encouraged to build our own careers here. When I realized we had no Government Affairs department, I decided to propose it. I wrote a paper on why Government Affairs, why now, and the incredible value and ROI this could have for us (especially with our partnerships). I sent my proposal to leadership for their consideration. From ideation to leadership approving the department and role, I had amazing mentors, guidance, and support from other women at MongoDB and employee resource groups like Sell Like a Girl and The Underrepresented People of Color. I am now the Head of Government Relations and Public Policy at MongoDB. As a Latina woman, having a company of MongoDB’s size make room for your ideas and contributions has been an incredibly fulfilling journey. There is still much work to be done to build our Government Affairs department, but I am incredibly blessed to work for people I admire and contribute to the company through a role I am passionate about. If you are looking for a great career in tech, I urge you to consider MongoDB. Adriano Fratelli , Customer Success Manager My family’s history in Brazil began with my grandparents who migrated from Calabria, Italy to São Paulo in the mid-1960s. My grandfather had received a job opportunity in the largest and most modern port in Latin America, Santos. Growing up in São Paulo, my childhood was rich with Brazilian culture. I was surrounded by family, music, dancing, great food, festivals (like Brazilian Carnival ), and sports. My journey into technology began with my father. He worked for 40 years as a technology product manager in the retail industry and inspired me to pursue a career in tech. I finished my degree in Information Systems in 2014 and started my professional career at IBM as a Field Technical Sales Specialist. I then worked at Lenovo and Oracle before looking for a new career opportunity. My decision to start a new journey at MongoDB was due to the great perspective that customers have regarding our products and services, along with MongoDB’s inclusive culture. The world of technology has opened up many opportunities in my personal life by helping me improve my English language skills and giving me exposure to different countries and cultures around the world. MongoDB is growing exponentially in the Latin American region and, as part of the Customer Success team, I enjoy that I’m able to help our customers onboard and adopt MongoDB’s services. One thing that makes working at MongoDB stand out is knowing that employee’s differences are embraced and our ideas are heard. As part of a global team, it’s great to know that I have the space and support to share my ideas and am valued for the unique perspective I bring. Read more stories from Hispanic and Latine employees at MongoDB . We’re embracing differences every day at MongoDB. Join us to make an impact and transform your career.