It is indeed done like that. Only that api->disk means the entire routing structure is re-written. We can employ some mechanism of colaescing the api requests and writing at regular configurable intervals.