@arunoda First off, Thanks for this wonderful package!!
I encountered a strange issue and I thought I would report it here. Here is my set up.
I have an app configured as Microservice using Cluster package's JS API deployed on 2 different servers (with Local MongoDB installations). They connect to a central db CENTRAL_CLUSTER (A separate mongo database without oplog configured)
Microservices have a method exposed via simple:rest
Meteor.method('record',function(data){
data.server = process.env.ROOT_URL;
Tracker.insert(data); //inserts in to local database
}
return {status:"ok"};
},{url:'/a/record'});
The issue being AJAX call made to one server and the data ends up in other database?. It looks like load balancing even though balancer is set to NULL?.
//Database entry in Tracker collection on Server 1 (AJAX call was made to server 2)
{
"_id" : ObjectId("7b6d0ccef9a7509dd0a0a855"),
"url" : " ",
"date" : "2015-11-06T16:16:18.293Z",
"timestamp" : 1446826578293.0000000000000000,
"app" : "tracker",
"token" : "SERVER2_TOKEN", //Token belongs to server 2
"server" : "server1" //<- Note AJAX call was made to server 2
}
When I set unique names to them (via mup), the issue seems to go away??
@arunoda First off, Thanks for this wonderful package!!
I encountered a strange issue and I thought I would report it here. Here is my set up. I have an app configured as Microservice using Cluster package's JS API deployed on 2 different servers (with Local MongoDB installations). They connect to a central db CENTRAL_CLUSTER (A separate mongo database without oplog configured)
when the apps come up the output looks like this on both machines (mup logs -f)
Database entries on CENTRAL_CLUSTER database looks like this
Microservices have a method exposed via simple:rest
The issue being AJAX call made to one server and the data ends up in other database?. It looks like load balancing even though balancer is set to NULL?.
When I set unique names to them (via mup), the issue seems to go away??
Is this a bug or my understanding is wrong? I would imagine name of the service should not matter here as we have unique endpointHash??
BTW, I also saw some CORS errors, which went away after I uniquely named the Microservices.
Thanks for looking in to it.