I am new to mapping and displaying data on maps. I was trying to display markers on a map where each marker represents a point of interest on my map.
Using leaflet it is quite straight forward  to add such markers.

My concern is what happens if I have many (lets say 400,000) such points spread (or actually clustered) around the world.

I was thinking that it would be nice if I could get the data from my server based on tiles,
i.e. if I could provide an API from my server that will return per tile (JSON) data and this data would be available for my to render on the map (or on the tile) using some form of "tileDataAdded" and "tileDataRemoved".

On the server side if the zoom level is too low I can just return the number of relevant points in the time (possibly with some average latlang) to allow some form of clustering display and if there is reasonable amount of data then it can be returned at its raw form.

Is there something like this that is already built or does my thinking that I should create some DataLayer class that implements ILayer makes some sense?