creating a distributed scan service to manage memory limitation