They are, technically speaking, synonyms. However, 'so long' and 'farewell' are not really used in English any more - at least as a greeting. You might say, "I am doing to someone's farewell-party.", meaning that you are going to the party where a group of people says farewell to someone.
'So long' is sometimes used, but you hardly hear it any more, unless amongst the older generation.
We use lots of words: Ciao (Actually Italian)! Bye! See you later! Look after yourself. Be good. Don't do anything I wouldn't. Take care (British).....All these phrases are said when leaving another person. They obviously mean what they say, but you can use these phrases.
Actually, 'bye' comes from Goodbye, which is a shortening for God Ye Bye - with the meaning of 'God be with you,' or 'God bless you.' But it no longer has that connotation or meaning.