SmartNews is a news discovery app that delivers the very best stories of the web, from breaking and local news stories to hidden gems. The app uses machine learning to evaluate tens of millions of articles, social signals, and subtle factors in real time to uncover which stories are worth reading in any given location. SmartNews has more than 14 million users worldwide and has won best app awards on the Apple App Store and Google Play.
Company needed to support a software delivery pipeline that consists of numerous microservices such as a news crawler, content extractor, image analysis engine, and search engine.
Engineering team needed to deploy multiple applications into multiple environments while minimizing operational costs.
Operations team needed to integrate deployment tasks with Auto Scaling so that newly launched instances have the latest application installed.
AWS CodeDeploy is used to automate deployment tasks.
Once a new commit is pushed into SmartNews’s version control system, a continuous integration (CI) service builds a new revision and uploads it to Amazon S3. The CI service then starts a new deployment task using AWS CodeDeploy.
CodeDeploy handles the complexity of updating the application, including tasks like operating Elastic Load Balancing (ELB), fetching a new revision, and restarting services using the team’s custom scripts, such as triggers downloading machine learning model data, precompiling assets, and deploying Docker containers.
When new instances are launched by Auto Scaling, AWS CodeDeploy deploys the latest healthy revision automatically before registering it to ELB.
CodeDeploy works with SmartNews’ existing continuous integration (CI) system. After the CI service produces a successful artifact, CodeDeploy handles deployment of the revision to EC2 instances. The architecture is described by the illustration below:
Flexibility: CodeDeploy’s AppSpec configuration file enables SmartNews to run custom scripts at different phases of each deployment.
Time savings: The engineering team does not have to spend time on deployment and can instead focus on improving the product.
Lower cost: The operations team takes advantage of Auto Scaling to save costs. CodeDeploy's Auto Scaling integration feature enables easy and safe deployments of new revisions as new instances are created.