serve icon indicating copy to clipboard operation
serve copied to clipboard

Config snapshot robustness

Open fbbradheintz opened this issue 6 years ago • 4 comments

Preserving server config with config file snapshots (issue #73) will have a few issues at launch:

  1. It won't support batch size configuration (see issue #64), as this is not yet supported in config files. This is part of server configuration that should be preserved.
  2. It may not do well with the case where model stores and/or config file folders are shared with other instances.
  3. There's currently nothing in place to guarantee atomicity of snapshot saves.

What we'll have in place for the first launch will be fine, but to make this a real enterprise tool, we should address these before v1.0.

fbbradheintz avatar Mar 23 '20 21:03 fbbradheintz

Current proposal (PR #111 ) uses the filesystem generated timestamp for deciding the last snapshot. This implies that any config changes that might have occurred between last snapshot and last shutdown will be taken care of since the files will be written through.

The obvious question is what if the filesystem is remote? The sequential consistency may not be always guaranteed by such services (ex: S3 or third party HDFS) In these cases, we need to ensure the serialization of the requests happen through implementation.

The point is, a filesystem's (local or remote) view will not be sufficient to achieve this successfully.

mycpuorg avatar Mar 28 '20 17:03 mycpuorg

We have left hooks open to introduce a new flag at startup, say --snapshotStorageType, which will decide where the snapshots are stored. Currently the value is hardcoded to FS at one place which will be replaced with the value passed through the flag in near future. The snapshot serialization is robust enough to easily introduce a new storage system in the snapshot serializer.

harshbafna avatar Apr 03 '20 16:04 harshbafna

Related to #362

codinnvrends avatar Jun 10 '20 10:06 codinnvrends

We have moved away from the initial design to a plugin-based architecture. And an out-of-box dynamo-db snapshot serializer plugin is under development. The recently released TorchServe serving-sdk 0.0.4 already allows user to write their own custom snapshot serializer.

Refer #362 and corresponding PR #536

harshbafna avatar Dec 21 '20 11:12 harshbafna