notation icon indicating copy to clipboard operation
notation copied to clipboard

Make Notation as a background process

Open jimmychen92 opened this issue 1 year ago • 2 comments

Is your feature request related to a problem?

One of the challenges we face in our enterprise scenarios is signing and verifying numerous artifacts from various container registries. This can become a CPU intensive operation when we run multiple Notation CLI commands in parallel.

This problem stems from the fact that each CLI command creates a new process, which consumes a significant amount of CPU and memory resources.

What solution do you propose?

My suggestion is to create a Notation service executable that can run as a background process and listen to a network port.

The caller can use http-based IPC to request signing and validating operations on artifacts.

This approach will reduce resource consumption, as there will be only one process handling all sign and verify requests.

What alternatives have you considered?

One possible solution is to package the Notation CLI executable on the host machine and invoke the CLI command from our service.

However, this solution has a scalability issue. According to my benchmark, it can consume all the CPU resources of the host machine when there are more than 50 notation sign and verify operations. Therefore, it is not suitable for handling a large number of artifacts.

Any additional context?

No response

jimmychen92 avatar Jul 06 '23 00:07 jimmychen92