How to ensure no duplicate records are added when using multiple Node JS processes
It sounds like the business key for an Appointment is (assigneeId, eventId, starttime, endtime).  Create a unique constraint on the business key (assigneeId, eventId, starttime, endtime) would fix the issue.  You need to catch unique constraint error returned by the DB on your app.