I'll try my best to answer your question.
Do you only want to keep the green card or apply for a US citizenship afterwards? If you're also after the US citizenship, you can apply for citizenship 3 years after obtaining your green card, of course, you can only do this if you stay married and have been living with your husband in the US the whole time.
About the 2 years, a PR/Conditional PR can apply for what they call the Re-entry permit valid for two years, it means one doesn't have to come back to the US for two years and by this s/he maintain the PR status. One can only apply for this twice, meaning one can only have a maximum of 4 years outside the US. No guarantee for the second application that they will give another two years, it could only be for a year, this depends on the reason why a person would be staying out of the country for that long. So the second time of application, one needs to come back to the US and wait for the appointment again. One can only apply for this while being physically present in the US, it takes a month to get the biometrics appointment, and it takes 2-3months for the actual re-entry permit to be delivered to an American address. It is highly advisable to apply for the permit 60 days before the intended date of traveling. One doesn't have to wait for the actual permit before leaving, it can be delivered to an American address, and have someone mail it outside the US. Both re-entry permit and GC should be valid upon entering the US.
By the way, do you have the Conditional Green Card? If yes, you can file a petition to remove the condition 90 days before your card expires. You cannot renew the conditional one, a permanent green card valid for 10 years will be mailed to you if the conditions will be lifted. Lastly, you don't give back the green card, you should keep it instead.