Store session data in cookie to share between Java based and Nodejs based application

I am working on existing application which is java based and we are migrating one page to NodeJS based application. We are thinking to take following approach.

  1. In the java server, at the end of response, just write session data which is required by both server in cookie in encrypted format
  2. NodeJS server will read this cookie to get the session data if any and will also update this cookie if any common session data is modified

Not sure if this is ok approach. Please note; we don't want to use any database to store the session data (As don't want to make more change in existing java based web application)

Looking for advice on this approach.