how to apply similarity algorithm(or comparision) of over one million vectors with other one million vectors?
You might want to take a look at this project FAISS.


  Faiss is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM. 


It has nice wrappers for you to use from Python. Check the wiki for examples on how you can integrate this in your application.

It is built with scalibilty in mind, supporting indexing and comparisons of millions of vectors and it can be run either on CPU or GPU.