The Elastisearch geo-shape datatype seems to support any kind of unit (at least judging from the precision field): https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-shape.html
NGA provides an Elasticsearch datastore that connects to Elastisearch:
However, I never tried either personally, and the ...
As I needed only the cost and not the entire path, I used pgr_dijkstraCost to calculate the costs and now it takes only 2 minutes for more than a million records.
I have also added another column to user information to store the nearest osm node and that made my query much faster than expected.
Below is the query.
INSERT INTO "UserTravelTime" ("FromId", "...