Day-01 | What is DevOps? | Facebook Dark Launching Technique

Day-01

DAY-01

Do you Know ?

Evolution of Software Development

How Facebook Uses DevOps

What is DevOps?

DevOps tools use in Companies?

Evolution of software Development?

Waterfall Model in Mobile App Development:

The Waterfall model is a traditional linear sequential approach to software development. In the context of mobile app development, it involves distinct, sequential stages that follow a specific order, where progress is seen as flowing steadily downwards (like a waterfall) through these phases.

1. Requirements Gathering: In the case of a mobile app, this stage involves gathering detailed requirements from stakeholders and potential users. For example, imagine a scenario where a company wants to develop a real-time messaging app similar to WhatsApp.

2. System Design: After understanding the requirements, the system design phase begins. This involves creating a detailed architecture for the app, including the user interface (UI) design, database structure, and technical specifications. For the real-time messaging app, this would involve designing the chat interface, message encryption, user authentication, etc.

3. Implementation: Once the designs are finalized, the development team starts coding the app based on the design specifications. This stage involves writing the code for the app’s frontend, backend, and integrating various functionalities. In our scenario, developers would code features such as sending and receiving messages in real-time.

4. Testing: The completed app undergoes rigorous testing to identify and fix any bugs or issues. This phase involves various types of testing like unit testing, integration testing, and user acceptance testing (UAT). Testers ensure that the real-time messaging feature works flawlessly across different devices and network conditions.

5. Deployment: Once the app passes all tests successfully, it’s ready for deployment. The app is released to the app stores (such as Apple App Store or Google Play Store) for users to download and use. The deployment includes making the app available for various mobile platforms (iOS, Android, etc.).

6. Maintenance: After the app is live, maintenance and support are crucial. This involves addressing user feedback, fixing reported issues, releasing updates, and continuously improving the app’s performance and features. For our messaging app, this might include adding new features like multimedia messaging or enhancing security protocols.

Real-Time Scenario: In a real-time messaging app like WhatsApp, the Waterfall model can be applied to ensure a structured development process. Each stage is critical to delivering a reliable, functional, and user-friendly app that enables seamless communication across devices.

This model, although sequential, might not be as flexible or adaptive as Agile methodologies. However, in certain contexts like initial mobile app development with well-defined requirements, it can provide a structured approach to the development process.

Agile

Agile development is a modern approach to software development that emphasizes flexibility, collaboration, and iterative progress. Unlike traditional methodologies like Waterfall, Agile is adaptive and responds to changes during the development process.

Key Principles of Agile Development:

  1. Iterative Development: Agile breaks the development process into smaller increments called iterations or sprints. Each iteration involves planning, executing, testing, and delivering a working piece of the software.
  2. Collaboration: Agile promotes close collaboration among cross-functional teams, including developers, testers, designers, and stakeholders. Communication is encouraged throughout the project to ensure everyone is aligned on goals and progress.
  3. Customer Involvement: Agile prioritizes customer feedback and involvement throughout the development cycle. This allows for adjustments and improvements based on changing requirements or user needs.
  4. Adaptability to Change: Agile recognizes that requirements and priorities can change over time. It allows for flexibility, enabling teams to adapt to changes, reprioritize tasks, and deliver value incrementally.
  5. Continuous Improvement: Agile encourages a culture of continuous improvement through regular retrospectives. Teams reflect on their processes, identify areas for enhancement, and implement changes in subsequent iterations.

Common Agile Methodologies:

  1. Scrum: It’s one of the most popular Agile frameworks. Scrum involves breaking work into time-boxed iterations called sprints, usually two to four weeks long. It includes specific roles (Scrum Master, Product Owner, Development Team), events (Sprint Planning, Daily Stand-ups, Sprint Review, Sprint Retrospective), and artifacts (Product Backlog, Sprint Backlog, Increment).
  2. Kanban: Kanban visualizes the workflow on a board with columns representing different stages of development. It focuses on continuous delivery and emphasizes limiting work in progress (WIP) to improve efficiency.
  3. Extreme Programming (XP): XP emphasizes engineering practices such as pair programming, test-driven development (TDD), continuous integration, and frequent releases to ensure high-quality software.

Benefits of Agile Development:

  • Faster time to market due to incremental development and regular releases.
  • Increased flexibility to accommodate changing requirements.
  • Better quality software through continuous testing and feedback.
  • Enhanced collaboration and transparency among teams and stakeholders.

Conclusion:

Agile methodologies offer a dynamic and collaborative approach to software development, enabling teams to respond effectively to changing requirements while delivering value to customers in a more iterative and adaptive manner.

DevOps?

Scenario: Developing a Social Media Mobile App

Imagine a team is developing a new social media mobile app that allows users to share photos and videos in real-time. The team aims to apply DevOps practices throughout the development lifecycle.

1. Collaboration and Communication:

  • Developers, operations engineers, QA testers, and product managers work closely together from the project’s inception. Regular meetings and discussions occur to align on goals and requirements.

2. Automation:

  • Automated testing frameworks are employed for various aspects of the app, including unit tests, integration tests, and UI tests. These tests run automatically whenever new code is committed, ensuring the app’s stability and functionality.

3. Continuous Integration and Continuous Deployment (CI/CD):

  • The team utilizes CI/CD pipelines to streamline the development process. Developers continuously push code changes to a shared repository (Continuous Integration), triggering automated builds, tests, and deployment to staging environments for validation (Continuous Deployment).

4. Infrastructure as Code (IaC):

  • Infrastructure provisioning is managed through code using tools like Terraform. This allows for consistent deployment of server resources, databases, and cloud services required by the app.

5. Monitoring and Feedback:

  • The app is continuously monitored in real-time using tools like Prometheus and Grafana. Metrics related to server performance, app responsiveness, and user interactions are collected to identify issues and improve performance.

6. Security:

  • Security measures are integrated throughout the development cycle. Automated security checks, such as code scanning for vulnerabilities, are implemented in CI/CD pipelines. Additionally, encryption methods are applied to secure user data.

Benefits in the Mobile App Scenario:

  • Faster Time to Market: Continuous integration and deployment allow for quick iterations and updates, ensuring new features and bug fixes reach users rapidly.
  • Improved Collaboration: The cross-functional team’s close collaboration leads to better communication, resulting in a user-friendly and cohesive app.
  • Higher Quality Software: Automated testing and continuous monitoring contribute to a more stable app with fewer bugs and better performance.
  • Increased Stability and Reliability: Through automated deployment and continuous monitoring, the app maintains stability, providing a reliable experience for users.

In this scenario, applying DevOps practices in mobile app development leads to a smoother, more efficient development process, resulting in a high-quality, feature-rich social media app delivered to users in a timely manner.

Facebook Faced Error

In 2011, Facebook encountered a significant outage that affected millions of users worldwide. The incident, often referred to as the “Facebook outage of 2011,” resulted in users experiencing difficulties accessing or using the social media platform for an extended period.

The specific technical details or official statements regarding the cause of the outage might not be publicly available or explicitly disclosed by Facebook. However, during this time, users reported encountering various issues, including:

  1. Complete Site Downtime: Many users were unable to access the Facebook website or log into their accounts for several hours. The site appeared inaccessible, displaying error messages or failing to load entirely.
  2. Limited Functionality: For those who could access the site intermittently, there were reports of limited functionality. Some features, such as posting updates, uploading photos, or sending messages, were either extremely slow or non-functional.
  3. Mobile App Issues: Users using Facebook’s mobile apps on smartphones and tablets also faced similar problems, experiencing difficulties in accessing their news feeds, posting updates, or interacting with friends.

The outage lasted for a significant portion of the day, causing frustration among users and raising concerns about the reliability and stability of such widely-used online platforms.

During major service disruptions like this, companies like Facebook often work diligently to identify the root cause, resolve the issue, and restore normal service as quickly as possible. However, due to the complexity of large-scale systems and the sensitivity of technical information, specific details regarding the exact cause might not always be publicly disclosed.

Dark Launching Technique

Dark launching, also known as feature toggling or feature flags, is a technique used by companies like Facebook to introduce new features or changes to their applications without making them immediately visible or accessible to all users. It allows for controlled testing and gradual rollouts while minimizing the risks associated with deploying new functionalities.

Real-life Scenario of Dark Launching at Facebook:

Imagine Facebook is planning to introduce a new feature, such as a redesigned user profile interface. To implement this using dark launching, the following steps might be taken:

1. Development and Implementation:

  • Facebook’s development team creates the new profile interface but doesn’t immediately activate it for all users.
  • Instead of deploying the feature to everyone at once, they implement a toggle or flag within the code that controls whether the new interface is visible.

2. Testing:

  • The newly developed feature is initially made accessible only to a small, select group of internal testers or a specific subset of users (like employees or a small percentage of the user base). This group is known as the “canary group.”
  • This limited release allows Facebook to gather feedback, test the feature’s performance, and identify any issues or bugs in a controlled environment.

3. Gradual Rollout:

  • Based on the feedback and performance observations from the canary group, Facebook can gradually expand the rollout to larger groups of users.
  • They might increase the visibility of the new profile interface to a larger percentage of users while continuously monitoring its impact and stability.

4. Full Deployment:

  • After thorough testing and ensuring the feature works as intended without major issues, Facebook can finally enable the new profile interface for all users across the platform.

Benefits of Dark Launching for Facebook:

  1. Risk Mitigation: By selectively releasing features to a smaller audience, Facebook reduces the risk of widespread issues or negative user experiences.
  2. Incremental Rollouts: Gradual deployment allows for monitoring performance and collecting feedback in real-time, ensuring a smoother transition.
  3. Flexibility: It enables Facebook to quickly toggle features on or off based on feedback or unexpected issues, providing greater control over deployments.

This technique of dark launching or feature flags is a strategic approach that enables companies like Facebook to innovate and evolve their platforms while minimizing disruptions and risks to the overall user experience.

What is DevOps?

DevOps is a set of practices, principles, and cultural philosophies that aim to improve collaboration and communication between software development (Dev) and IT operations (Ops) teams. It focuses on streamlining the software delivery process, ensuring faster and more reliable development, deployment, and operation of applications.

Here’s another use case scenario illustrating how DevOps principles can be applied:

Use Case Scenario: E-commerce Platform

Imagine a company running a large e-commerce platform that experiences high traffic during peak seasons. To enhance its platform using DevOps practices, they implement the following strategies:

1. Automation and Continuous Integration/Continuous Deployment (CI/CD):

  • Infrastructure Automation: Implement infrastructure as code (IaC) using tools like Terraform or AWS CloudFormation. Automate the provisioning of servers, databases, and cloud resources.
  • Continuous Integration/Continuous Deployment Pipelines: Set up CI/CD pipelines using tools like Jenkins or GitLab CI. Developers commit code changes regularly, triggering automated builds, tests, and deployment to staging and production environments.

2. Scalability and Elasticity:

  • Containerization and Orchestration: Utilize containerization with Docker and orchestration with Kubernetes to manage and scale the application’s microservices. This allows the platform to dynamically adjust resources based on traffic demands.

3. Monitoring and Feedback:

  • Logging and Monitoring Tools: Implement monitoring tools such as Prometheus, Grafana, or ELK Stack to track performance metrics, server health, and user interactions in real-time.
  • Automated Alerts and Notifications: Set up automated alerts to notify the operations team about any anomalies, performance degradation, or potential issues.

4. Security and Compliance:

  • Security as Code: Embed security practices throughout the software development lifecycle. Use automated security checks in CI/CD pipelines to detect vulnerabilities early.
  • Compliance Automation: Implement compliance checks and automated audits to ensure adherence to industry standards and regulations.

5. Incident Response and Recovery:

  • Automated Incident Response: Develop automated responses to common incidents or failures to minimize downtime. Implement automated rollback mechanisms in case of deployment failures.
  • Disaster Recovery Planning: Create and regularly test disaster recovery plans to ensure data integrity and business continuity.

Benefits for the E-commerce Platform:

  • Scalability and Performance: The platform can efficiently handle increased traffic during peak seasons without compromising performance.
  • Reliability and Stability: Automated testing and monitoring contribute to a more stable system with fewer errors and faster issue resolution.
  • Security and Compliance: Integration of security practices throughout the development process ensures a more secure and compliant platform.
  • Faster Time to Market: Continuous delivery practices enable quicker deployment of new features and updates, meeting market demands more effectively.

This use case demonstrates how implementing DevOps practices can significantly benefit an e-commerce platform, enabling it to be more agile, scalable, reliable, and secure while efficiently managing high traffic and ensuring a seamless user experience.

DevOps tools?

Here are some popular DevOps tools along with brief descriptions of their functionalities:

  1. Jenkins:
    • Jenkins is an open-source automation server used for Continuous Integration (CI) and Continuous Delivery (CD). It helps automate the building, testing, and deployment of software.
  2. Git/GitHub/GitLab:
    • Git is a distributed version control system used to track changes in source code during development. GitHub and GitLab are platforms built on top of Git, providing hosting services for software development and collaboration.
  3. Docker:
    • Docker is a containerization platform that enables developers to package applications and their dependencies into standardized containers. It allows for easy deployment and scaling across different environments.
  4. Kubernetes:
    • Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications. It helps in managing containerized workloads across a cluster of nodes.
  5. Ansible:
    • Ansible is a configuration management tool that automates the provisioning and configuration of software and infrastructure. It uses simple YAML-based scripts (Playbooks) for automation.
  6. Terraform:
    • Terraform is an Infrastructure as Code (IaC) tool used to provision and manage infrastructure resources across various cloud platforms. It allows defining infrastructure in declarative configuration files.
  7. Puppet:
    • Puppet is a configuration management tool that automates the provisioning, configuration, and management of IT infrastructure. It ensures consistency and compliance across multiple systems.
  8. Chef:
    • Chef is another configuration management tool used for automating infrastructure deployment and management. It uses Ruby-based scripts (Recipes) to define infrastructure configurations.
  9. Prometheus:
    • Prometheus is an open-source monitoring and alerting toolkit designed for collecting and visualizing metrics from different systems. It helps in monitoring system performance and health.
  10. Grafana:
    • Grafana is a visualization and monitoring tool used to create dashboards and graphs for time-series data. It integrates with various data sources, including Prometheus, to visualize metrics.
  11. ELK Stack (Elasticsearch, Logstash, Kibana):
    • ELK Stack is a combination of three open-source tools used for log management and analysis. Elasticsearch is for data storage, Logstash is for log processing, and Kibana is for data visualization.
  12. Jira:
    • Jira is an agile project management tool used for issue tracking, project management, and software development. It helps teams plan, track, and manage their work.

These tools collectively support different aspects of the DevOps lifecycle, including source code management, automation, infrastructure provisioning, monitoring, orchestration, and collaboration. The choice of tools often depends on specific project requirements, team preferences, and the technologies being used in the software development process.

mrcloudbook.com avatar

Ajay Kumar Yegireddi is a DevSecOps Engineer and System Administrator, with a passion for sharing real-world DevSecOps projects and tasks. Mr. Cloud Book, provides hands-on tutorials and practical insights to help others master DevSecOps tools and workflows. Content is designed to bridge the gap between development, security, and operations, making complex concepts easy to understand for both beginners and professionals.

Comments

3 responses to “Day-01 | What is DevOps? | Facebook Dark Launching Technique”

  1. Sudarsan avatar

    Excellent and professional way to teach.

  2. Udayakumar avatar
    Udayakumar

    Day 2 how to access??

Leave a Reply

Your email address will not be published. Required fields are marked *