Note that there are some explanatory texts on larger screens.

plurals
  1. PODev Environment for Complex DB Setup?
    primarykey
    data
    text
    <p>I have been the sole developer for a complex application that has grown to the point where I need to begin to build a team of developers. Our system is a ~250,000 LOC PHP app with MySQL as the backend DB.</p> <p>I have a staging server which perfectly replicates the production web servers and compute nodes. In the past, I have been committing/pushing to staging, run tests, and then push to production when I have debugged everything. This has been very useful and there haven't been any issues because I have been extremely careful about testing MySQL alters, inserts, deletes, etc as the staging server hits production DB servers.</p> <p>Being the sole developer, I haven't gone down the path of replicating the MySQL servers into a staging or dev clone. This is because our app deals with several thousand tables sharded across 4 production DB servers using a consistent hashing algorithm for table lookup. I haven't figured out how I can clone and keep in sync these DB servers (each one is 8 cores with 64GB of RAM). Our total DB size is ~300GB. Keeping this much data in sync seems to be nearly impossible with a small dev enviornment. Not to mention that if I did keep them in sync the dev/staging environment would be so slow that it might be close to unusable. </p> <p>I've thought about building tons of test data and just keep the schemas in sync, but I would like for devs to see production data to code and debug against. Given the nature of our application, it is important that a developer sees the same data that populates the production DB servers.</p> <p>My question is what should I do for a dev environment in this scenario? I want to give devs the freedom to play around with schema as they code complicated parts of the system, but I don't want them playing with live schemas/data. I should also note, that I keep hourly and daily backups of all the DB servers both onsite and offsite. I can rollback MySQL tables, but it will be painful and might require some downtime. I'm thinking the best option is to avoid this need in the first place.</p> <p>What has anyone else done successfully? I doubt that places like Facebook and Google replicate their entire DB setup to developer machines so there has to be some sort of setup/process that I am just not aware of.</p> <p>Thanks for taking the time to read this lengthy post and I look forward to any advice you may have.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload