Last active
August 29, 2015 14:15
-
-
Save paulghaddad/e1636a3b363d7e0fc09f to your computer and use it in GitHub Desktop.
Level Up 7: Knows why prod should be like development, and why it's not
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Give some examples of problems you've seen (or we see) when dev and prod differ. | |
The following are some of the issues I have seen when development and production differ: | |
- The various gems of the application often cause different issues in different environments. | |
- The application responds differently in production because of the server setup, such as using SSL. Often, this requires configuration changes. | |
- Because of poor choices in past development, the production database contains poor data, such as improper null values or data that wasn't validated thoroughly. This affects current development decisions because the production data can't be easily modified. | |
- Using different web servers between environments (i.e., Webbrick in development; Apache or Nginx in production) that are fundamentally different. | |
2. Explain why dev will never be just like prod, and how we can mitigate some of the differences. | |
Some of the main differences between development and production that will never go away: | |
- In development, we almost never use caching, while we do in production. | |
- Larger amounts of data are stored in the production database. | |
- There are larger numbers of client requests in production. | |
- Clients intentionally trying to circumvent security protocols, such as through SQL injection or DDoS attacks. | |
- Different database structures. In development, a single database is typically used; in production, a master/slaves if used for larger applications. | |
Methods to mitigate some of these differences include: | |
- Place larger amounts of data in the development database to see how the application responds. | |
- Creating development environments, using tools such as Virtual Machines and Vagrant, that closely match the production environment. | |
- Subject the development environment to simulated security attacks to ensure it responds properly. | |
- Use the same web server on both development and production. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment