It is very likely that you will want to create multiple key sets (pub/sub keys) for a single app so that your developers can implement new features and fix bugs, while your QA team is verifying that the next version is ready for production and meanwhile, your customers need to be unaffected by all this preproduction activity. You already have a database for each of these separate environments so it is only fitting that you will want separate PubNub key sets for each environment, also.
You can create multiple key sets in the PubNub Admin Dashboard under a single app. Each key set will be configured according to its designated environment. Typically, dev and test keys will remain on the Free tier and the production key set will be upgraded to a paid tier. Use the Admin Dashboard to add key sets to an existing app and configure them as required (Presence, Storage, etc).
When creating key sets in the PubNub Admin Dashboard, treat each of your key sets the same as your database instances. If you already have an environment config file containing the database connection parameters for the current environment that your app ingests at the initialization phase, then you can include the appropriate PubNub keys in there, too. For example, in your PubNub Admin Dashboard, you might have a couple of apps with three key sets:
- App 1
- App 2
You can have as many apps and key sets as you need. You will likely upgrade certain keys (typically your production keys) to a paid account at some point (before you deploy your application). Also, key sets that are organized under an app can display aggregated metrics in the Admin Dashboard.