https://docs.mongodb.com/manual/tutorial/expire-data/ 특정 시간 이후에 데이터를 자동으로 삭제하고 싶을 경우 ttl을 활용한다. mongodb에는 ttl인덱스가 있다.db.log_events.createIndex( { "createdAt": 1 }, { expireAfterSeconds: 3600 } ) When adding documents to the log_events collection, set the createdAt field to the current time:copycopieddb.log_events.insert( { "createdAt": new Date(), "logEvent": 2, "logMessage": "Success!" } )일부 자료..