title: How many web-push Subscription objects should I keep in database?
body: <p>I'm new to web-push notifications and I've created a web app handy for both PC and mobile. I created notifications and due to limited storage (free 512 MB in Mongo Atlas), I need wanted to know how many Push Subscription objects should I store in database to send notifications to?</p>
  <p>Scenario 1:
  if a user uses 2 devices both will get float notifications, but if he discards one device, or changes a browser, the older browser entries will become useless and take space in database.</p>
  <p>Scenario 2:
  if user uses multiple devices I keep the record of the latest device/browser, but this will keep him from getting notifications in his older devices.</p>
  <p>Which one will be optimum?</p>
  <p>structure of sub object:</p>
  <pre><code>{&quot;endpoint&quot;:&quot;https://fcm.googleapis.com/fcm/send/eDeNLoS7m7M:APA91bF7HHZ6_hujpm47yuikjMNVx247fuLAAkxZbnj_cF2ODmqo-UgU-dKGKYXwNbdq0LS-Ns8eWFFmv52uzQO6agTcEjGMifpfomPwpm8VHEUKxyX3ms7J1aLi34gzKXgdxL8AiAvo&quot;,
  &quot;expirationTime&quot;:null,
  &quot;keys&quot;: {
    &quot;p256dh&quot;:&quot;BBDbLS_UBcaDIEgtK9rzCLYRLzYyrC_f9GGPTymPIT79Wpsn_k9x_vpPEa13DOR5ZZ-ohT-YX4aBHloYx0WpdPE&quot;,
    &quot;auth&quot;:&quot;f1UCyrwzENKsKec7qa9Myg&quot;
          }
  }
  </code></pre>
  <p>Mongoose schema of collection:</p>
  <pre><code>const pushNotificationsSchema = mongoose.Schema({
      _id: {type: mongoose.Types.ObjectId, require: true, ref: 'User'},
      subobjects: {type:[Object], default: []},
      time: String
  });
  </code></pre>
  <p>Thanks in advance</p>